/vendor/zendframework/zendframework/tests/ZendTest/Stdlib/GlobTest.php
PHP | 35 lines | 22 code | 5 blank | 8 comment | 1 complexity | a386029ae8245964e727b6329d28dfa4 MD5 | raw file
- <?php
- /**
- * Zend Framework (http://framework.zend.com/)
- *
- * @link http://github.com/zendframework/zf2 for the canonical source repository
- * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- * @license http://framework.zend.com/license/new-bsd New BSD License
- * @package Zend_Stdlib
- */
- namespace ZendTest\Stdlib;
- use PHPUnit_Framework_TestCase as TestCase;
- use Zend\Stdlib\Glob;
- class GlobTest extends TestCase
- {
- public function testFallback()
- {
- if (!defined('GLOB_BRACE')) {
- $this->markTestSkipped('GLOB_BRACE not available');
- }
- $this->assertEquals(
- glob(__DIR__ . '/_files/{alph,bet}a', GLOB_BRACE),
- Glob::glob(__DIR__ . '/_files/{alph,bet}a', Glob::GLOB_BRACE, true)
- );
- }
- public function testNonMatchingGlobReturnsArray()
- {
- $result = Glob::glob('/some/path/{,*.}{this,orthis}.php', Glob::GLOB_BRACE);
- $this->assertInternalType('array', $result);
- }
- }