Allow hhvm php5.2 and php-nightly to fail, define ARRAY_FILTER_USE_* to try and avoid hhvm failure
This commit is contained in:
parent
8bb6d1f55c
commit
46c9502177
|
@ -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
|
||||
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue