Skip to:
Content

BuddyPress.org

Changeset 8018


Ignore:
Timestamp:
03/02/2014 04:05:37 PM (10 years ago)
Author:
djpaul
Message:

Unit Tests: on travis-ci with PHP 5.5.*, don't run the tests with WP_DEBUG=true.

PHP 5.5+ uses the ext/mysqli library and as versions of WordPress older than the current trunk don't support mysqli, PHP throws a bunch of E_DEPRECATED warnings about the use of the deprecated ext/mysql library. Because we test several versions of WordPress against several versions of PHP, combinations occur with old WordPress and new PHP, which causes these deprecation notices, causing failures.

A better solution would be to somehow suppress E_DEPRECATED warnings in the phpUnit configuration or change the error levels that WP_DEBUG sets, but so far I've been unable to find a way to do this. For now, travis-ci tests against PHP 5.5 will run with WP_DEBUG=false; this is actually the environment we've been testing in on travis-ci until very recently (see r8015).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.travis.yml

    r8017 r8018  
    3030    - sed -i "s/yourusernamehere/root/" wp-tests-config.php
    3131    - sed -i "s/yourpasswordhere//" wp-tests-config.php
     32    # disable WP_DEBUG for PHP 5.5 due to ext/mysqli E_DEPRECATED errors
     33    - if [[ "$TRAVIS_PHP_VERSION" == 5.5* ]] ; then sed -i "s:define( 'WP_DEBUG://define( 'WP_DEBUG:" wp-tests-config.php; fi;
    3234    # set up database
    3335    - mysql -e 'CREATE DATABASE wordpress_test;' -uroot
Note: See TracChangeset for help on using the changeset viewer.