diff --git a/.travis.yml b/.travis.yml index a1c07a6..bb305a6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,19 @@ language: php php: + - '5.2' + - '5.3' - '5.4' - '5.5' - '5.6' - '7.0' - hhvm - nightly +matrix: + allow_failures: + - php: 5.2 + - php: hhvm + - php: nightly + before_script: - composer install --dev diff --git a/tests/Sikofitt/Tests/ArrayObjectArrayTest.php b/tests/Sikofitt/Tests/ArrayObjectArrayTest.php index 6a2f2ba..c70b5e8 100644 --- a/tests/Sikofitt/Tests/ArrayObjectArrayTest.php +++ b/tests/Sikofitt/Tests/ArrayObjectArrayTest.php @@ -269,6 +269,13 @@ class ArrayObjectArrayTest extends \PHPUnit_Framework_TestCase $this->assertSame(array_filter($this->workingMultiArray), $this->arrayObjectArrayMulti->array_filter()); $this->assertSame(array_filter($this->workingMultiArray, $array_filter), $this->arrayObjectArrayMulti->array_filter($array_filter)); // The third parameter was added in php 5.6 + if(!defined('ARRAY_FILTER_USE_BOTH')) { + define('ARRAY_FILTER_USE_BOTH', 1); + } + if(!defined('ARRAY_FILTER_USE_KEY')) { + define('ARRAY_FILTER_USE_KEY', 2); + } + if (PHP_VERSION_ID >= 50600) { $this->assertSame(array_filter($this->workingMultiArray, $array_filter, ARRAY_FILTER_USE_BOTH), $this->arrayObjectArrayMulti->array_filter($array_filter, ARRAY_FILTER_USE_BOTH)); $this->assertSame(array_filter($this->workingMultiArray, $array_filter, ARRAY_FILTER_USE_KEY), $this->arrayObjectArrayMulti->array_filter($array_filter, ARRAY_FILTER_USE_KEY));