Skip to content

Commit 6b639ac

Browse files
authoredNov 1, 2019
[Travis] Add testing for PHP 7.2 and 7.3 (#1446)
* [Travis] Add testing for PHP 7.2 and 7.3 * [Test] Make sure to run phpunit from local dir and not from project dir * [PPH7.3] Fix issues found on PHP 7.3
1 parent dffc4fd commit 6b639ac

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed
 

‎.travis.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,11 @@ matrix:
3232
env: DB="postgresql" DB_USER="postgres"
3333
- php: 7.1
3434
env: DB="mysql" DB_USER="root"
35-
# Will need to update phpunit for this: https://travis-ci.org/ezsystems/ezpublish-legacy/jobs/279543965#L625
36-
# - php: 7.2
37-
# env: DB="postgresql" DB_USER="postgres"
35+
- php: 7.2
36+
env: DB="postgresql" DB_USER="postgres"
37+
- php: 7.3
38+
env: DB="mysql" DB_USER="root"
39+
3840

3941
before_script:
4042
- if [ $DB == "mysql" ]; then mysql -e "CREATE DATABASE IF NOT EXISTS $DB_NAME;" -u$DB_USER ; fi

‎composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"zetacomponents/webdav": "~1.1"
6262
},
6363
"require-dev": {
64-
"phpunit/phpunit": "3.7.*",
64+
"phpunit/phpunit": "4.8.36",
6565
"zetacomponents/php-generator": "~1.1"
6666
},
6767
"autoload": {

‎kernel/private/rest/classes/cache/cluster.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public function restore( $id, $attributes = array(), $search = false )
118118
null, // We won't call any generate callback as we're using ezcCache mechanism, so it's up to the cache caller to generate
119119
$this->properties['options']['ttl'],
120120
null,
121-
compact( 'id', 'attributes', 'fileName' )
121+
compact( 'id', 'attributes' )
122122
);
123123

124124
if ( !$result instanceof eZClusterFileFailure )

‎lib/ezdb/classes/ezmysqlidb.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,7 @@ function availableDatabases()
912912
$databases = array();
913913

914914
$numRows = mysqli_num_rows( $databaseArray );
915-
if ( count( $numRows ) == 0 )
915+
if ( $numRows == 0 )
916916
{
917917
return false;
918918
}

‎tests/runtests.php

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
set_time_limit( 0 );
1313

14+
require_once 'vendor/autoload.php';
15+
1416
require_once 'autoload.php';
1517

1618
if ( !class_exists( 'ezpTestRunner', true ) )

0 commit comments

Comments
 (0)
Please sign in to comment.