php - Travis cannot find 'PHPUnit_Framework_TestCase' – sometimes -


i've started using travis ci test php code. sometimes, builds fail message

php fatal error: class 'phpunit_framework_testcase' not found in /home/travis/build/ms609/citation-bot/tests/phpunit/expandfnstest.php on line 13

on other occasions, without having changed relevant code, builds succeed.
makes me suspect issue @ travis's end rather own.

this makes me wonder: there can reduce likelihood of encountering error? , on builds when error arises, possible have travis re-attempt build without making new commit?

i had inherited testcase written using older version of phpunit. backwards compatibility, had added code

if (!class_exists('\phpunit\framework\testcase') &&     class_exists('\phpunit_framework_testcase')) {     class_alias('\phpunit_framework_testcase', 'phpunit\framework\testcase'); } 

what needed next replace

class mytest extends phpunit_framework_testcase { 

with

class mytest extends phpunit\framework\testcase { 

with regards second part of question, signing in travis ci reveals "restart build" option on build page.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -