PageRenderTime 44ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/vendor/zendframework/zendframework/tests/ZendTest/Stdlib/GlobTest.php

https://bitbucket.org/pcelta/zf2
PHP | 35 lines | 22 code | 5 blank | 8 comment | 1 complexity | a386029ae8245964e727b6329d28dfa4 MD5 | raw file
  1. <?php
  2. /**
  3. * Zend Framework (http://framework.zend.com/)
  4. *
  5. * @link http://github.com/zendframework/zf2 for the canonical source repository
  6. * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
  7. * @license http://framework.zend.com/license/new-bsd New BSD License
  8. * @package Zend_Stdlib
  9. */
  10. namespace ZendTest\Stdlib;
  11. use PHPUnit_Framework_TestCase as TestCase;
  12. use Zend\Stdlib\Glob;
  13. class GlobTest extends TestCase
  14. {
  15. public function testFallback()
  16. {
  17. if (!defined('GLOB_BRACE')) {
  18. $this->markTestSkipped('GLOB_BRACE not available');
  19. }
  20. $this->assertEquals(
  21. glob(__DIR__ . '/_files/{alph,bet}a', GLOB_BRACE),
  22. Glob::glob(__DIR__ . '/_files/{alph,bet}a', Glob::GLOB_BRACE, true)
  23. );
  24. }
  25. public function testNonMatchingGlobReturnsArray()
  26. {
  27. $result = Glob::glob('/some/path/{,*.}{this,orthis}.php', Glob::GLOB_BRACE);
  28. $this->assertInternalType('array', $result);
  29. }
  30. }