Skip to content

Commit

Permalink
[Travis] Add testing for PHP 7.2 and 7.3 (#1446)
Browse files Browse the repository at this point in the history
* [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
  • Loading branch information
andrerom committed Nov 1, 2019
1 parent dffc4fd commit 6b639ac
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ matrix:
env: DB="postgresql" DB_USER="postgres"
- php: 7.1
env: DB="mysql" DB_USER="root"
# Will need to update phpunit for this: https://travis-ci.org/ezsystems/ezpublish-legacy/jobs/279543965#L625
# - php: 7.2
# env: DB="postgresql" DB_USER="postgres"
- php: 7.2
env: DB="postgresql" DB_USER="postgres"
- php: 7.3
env: DB="mysql" DB_USER="root"


before_script:
- if [ $DB == "mysql" ]; then mysql -e "CREATE DATABASE IF NOT EXISTS $DB_NAME;" -u$DB_USER ; fi
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"zetacomponents/webdav": "~1.1"
},
"require-dev": {
"phpunit/phpunit": "3.7.*",
"phpunit/phpunit": "4.8.36",
"zetacomponents/php-generator": "~1.1"
},
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion kernel/private/rest/classes/cache/cluster.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public function restore( $id, $attributes = array(), $search = false )
null, // We won't call any generate callback as we're using ezcCache mechanism, so it's up to the cache caller to generate
$this->properties['options']['ttl'],
null,
compact( 'id', 'attributes', 'fileName' )
compact( 'id', 'attributes' )
);

if ( !$result instanceof eZClusterFileFailure )
Expand Down
2 changes: 1 addition & 1 deletion lib/ezdb/classes/ezmysqlidb.php
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ function availableDatabases()
$databases = array();

$numRows = mysqli_num_rows( $databaseArray );
if ( count( $numRows ) == 0 )
if ( $numRows == 0 )
{
return false;
}
Expand Down
2 changes: 2 additions & 0 deletions tests/runtests.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

set_time_limit( 0 );

require_once 'vendor/autoload.php';

require_once 'autoload.php';

if ( !class_exists( 'ezpTestRunner', true ) )
Expand Down

0 comments on commit 6b639ac

Please sign in to comment.