From 3e08d173a14bec76c661d98b928689b80bb2061a Mon Sep 17 00:00:00 2001 From: Josh Sherman Date: Sat, 13 Sep 2014 16:43:29 -0400 Subject: [PATCH] Cleaned up issues with `phpunit` 4.2.x --- .travis.yml | 4 ++-- tests/classes/DisplayTest.php | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3662ed4..7cd984b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,16 +30,16 @@ before_script: - echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - echo -e "zend_$(cat ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini)" > ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini + - echo "zend_extension = /home/travis/.phpenv/versions/$(php -r 'echo phpversion();')/lib/php/extensions/no-debug-zts-20100525/uopz.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - echo "[uopz]" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - echo "uopz.overloads=1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - - phpunit --version - mysql -e "create database IF NOT EXISTS test;" -u root - mysql test < tests/schema.sql -u root - mkdir -p build/logs - phpenv rehash script: - - phpunit --colors --coverage-clover /home/travis/build/joshtronic/pickles/build/logs/clover.xml --bootstrap ./tests/bootstrap.php ./tests + - phpunit --stderr --colors --coverage-clover /home/travis/build/joshtronic/pickles/build/logs/clover.xml --bootstrap ./tests/bootstrap.php ./tests after_success: - php vendor/bin/coveralls --config ../.coveralls.yml -v diff --git a/tests/classes/DisplayTest.php b/tests/classes/DisplayTest.php index 7a6d545..e7d1f2e 100644 --- a/tests/classes/DisplayTest.php +++ b/tests/classes/DisplayTest.php @@ -40,6 +40,9 @@ class DisplayTest extends PHPUnit_Framework_TestCase { $this->display->return = 'invalid'; $this->assertEquals('Invalid return type.', $this->display->render()); + + // Gotta do this or the test will be considered "risky" + ob_end_clean(); } public function testPHPSESSID() @@ -50,6 +53,9 @@ class DisplayTest extends PHPUnit_Framework_TestCase $this->assertTrue(in_array('Location: ' . $request_uri, xdebug_get_headers())); $this->assertEquals('Requested URI contains PHPSESSID, redirecting.', $return); + + // Gotta do this or the test will be considered "risky" + ob_end_clean(); } public function testNoParentTemplate()