Permalink
Browse files

fix test suite for PHP 5.3

  • Loading branch information...
1 parent f07aed0 commit 67b64a562ada2f5c6aa8114db8aa3c89c2aa90f4 @remicollet remicollet committed Oct 5, 2015
Showing with 24 additions and 23 deletions.
  1. +1 −0 composer.json
  2. +23 −23 tests/PathComparatorTest.php
View
@@ -6,6 +6,7 @@
"zetacomponents/console-tools": "~1.7"
},
"require-dev": {
+ "php": ">=5.3",
"phpunit/phpunit": "~4.0|~5.0",
"squizlabs/php_codesniffer": "~1.5"
},
@@ -15,29 +15,29 @@ public function testComparatorYieldsCorrectCommonBase(array $directories, $commo
}
public function directoriesProvider() {
- return [
- 'empty' => [
- [], '/'
- ],
- 'single' => [
- [__DIR__], __DIR__
- ],
- 'two' => [
- [__DIR__, dirname(__DIR__)], dirname(__DIR__)
- ],
- 'parents' => [
- [__DIR__ . '/../src', __DIR__ . '/../tests/_data'], dirname(__DIR__)
- ],
- 'with0' => [
- [$a=__DIR__.'/_data/parser/trait0.php'], $a
- ],
- 'dirwithprefix' => [
- [__DIR__.'/_data/parser/trait0.php', __DIR__.'/_data/parser/trait1.php'], __DIR__.'/_data/parser'
- ],
- 'dirwithoutprefix' => [
- [__DIR__, '/usr'], '/'
- ]
- ];
+ return array(
+ 'empty' => array(
+ array(), '/'
+ ),
+ 'single' => array(
+ array(__DIR__), __DIR__
+ ),
+ 'two' => array(
+ array(__DIR__, dirname(__DIR__)), dirname(__DIR__)
+ ),
+ 'parents' => array(
+ array(__DIR__ . '/../src', __DIR__ . '/../tests/_data'), dirname(__DIR__)
+ ),
+ 'with0' => array(
+ array($a=__DIR__.'/_data/parser/trait0.php'), $a
+ ),
+ 'dirwithprefix' => array(
+ array(__DIR__.'/_data/parser/trait0.php', __DIR__.'/_data/parser/trait1.php'), __DIR__.'/_data/parser'
+ ),
+ 'dirwithoutprefix' => array(
+ array(__DIR__, '/usr'), '/'
+ )
+ );
}
}

0 comments on commit 67b64a5

Please sign in to comment.