Page MenuHomePhabricator

Class 'PHPUnit_Framework_ComparisonFailure' not found in ApiQueryTestBase.php on line 121
Closed, ResolvedPublic

Description

when I run core unit tests with phpunit 4.5:

Fatal error: Class 'PHPUnit_Framework_ComparisonFailure' not found in /Library/WebServer/Documents/php-master/tests/phpunit/includes/api/query/ApiQueryTestBase.php on line 121

Call Stack:

 0.0005     276760   1. {main}() /Library/WebServer/Documents/php-master/tests/phpunit/phpunit.php:0
 0.1091   13764536   2. PHPUnit_TextUI_Command::main() /Library/WebServer/Documents/php-master/tests/phpunit/phpunit.php:239
 0.1091   13765160   3. PHPUnit_TextUI_Command->run() /Library/WebServer/Documents/php-master/vendor/phpunit/phpunit/src/TextUI/Command.php:104
23.1963  378913480   4. PHPUnit_TextUI_TestRunner->doRun() /Library/WebServer/Documents/php-master/vendor/phpunit/phpunit/src/TextUI/Command.php:152
24.1140  379318824   5. PHPUnit_Framework_TestSuite->run() /Library/WebServer/Documents/php-master/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:398
25.9995  379324424   6. PHPUnit_Framework_TestSuite->run() /Library/WebServer/Documents/php-master/vendor/phpunit/phpunit/src/Framework/TestSuite.php:716
65.5201  455416224   7. PHPUnit_Framework_TestSuite->run() /Library/WebServer/Documents/php-master/vendor/phpunit/phpunit/src/Framework/TestSuite.php:716
65.5220  455419920   8. MediaWikiTestCase->run() /Library/WebServer/Documents/php-master/vendor/phpunit/phpunit/src/Framework/TestSuite.php:716
65.5254  455450608   9. PHPUnit_Framework_TestCase->run() /Library/WebServer/Documents/php-master/tests/phpunit/MediaWikiTestCase.php:132
65.5255  455451016  10. PHPUnit_Framework_TestResult->run() /Library/WebServer/Documents/php-master/vendor/phpunit/phpunit/src/Framework/TestCase.php:693
65.5255  455453064  11. PHPUnit_Framework_TestCase->runBare() /Library/WebServer/Documents/php-master/vendor/phpunit/phpunit/src/Framework/TestResult.php:609
65.6518  455716984  12. PHPUnit_Framework_TestCase->runTest() /Library/WebServer/Documents/php-master/vendor/phpunit/phpunit/src/Framework/TestCase.php:737
65.6518  455717760  13. ReflectionMethod->invokeArgs() /Library/WebServer/Documents/php-master/vendor/phpunit/phpunit/src/Framework/TestCase.php:860
65.6518  455717904  14. ApiQueryBasicTest->testProps() /Library/WebServer/Documents/php-master/vendor/phpunit/phpunit/src/Framework/TestCase.php:860
65.6518  455718008  15. ApiQueryTestBase->check() /Library/WebServer/Documents/php-master/tests/phpunit/includes/api/query/ApiQueryBasicTest.php:226
65.6593  455865808  16. ApiQueryTestBase->assertResult() /Library/WebServer/Documents/php-master/tests/phpunit/includes/api/query/ApiQueryTestBase.php:107

Event Timeline

aude raised the priority of this task from to High.
aude updated the task description. (Show Details)
aude added a project: MediaWiki-Core-Tests.
aude subscribed.
Yurik subscribed.

I ran into this issue too. phpunit has removed that class in this commit, instead adding a dependency on "sebastian/comparator": "dev-master", (this repo).

The class name changed to \SebastianBergmann\Comparator\ComparisonFailure\ComparisonFailure

Change 197249 had a related patch set uploaded (by Yurik):
Fixed phpunit exception test

https://gerrit.wikimedia.org/r/197249

Change 197249 merged by jenkins-bot:
Fixed phpunit exception test

https://gerrit.wikimedia.org/r/197249