I'm new to PHP and I got existing CakePHP project but I cannot start it from PHP Storm. Every time I want to run app it shows error:
PHP Fatal error: Uncaught Error: Class 'CakeTestSuite' not found in C:\\xampp\\htdocs\\dummy\\dummy_app\\Plugin\\AclExtras\\Test\\Case\\AllTestsTest.php:16
AllTestsTest.php
file:
require_once 'PHPUnit/Autoload.php';
class AllTestsTest extends PHPUnit_Framework_TestSuite {
public static function suite() {
$suite = new CakeTestSuite('All Tests');
$suite->addTestDirectoryRecursive(App::pluginPath('AclExtras') . 'Test' . DS . 'Case' . DS);
return $suite;
}
}
Error is set to: $suite = new CakeTestSuite('All Tests');
Any ideas why or how to fix this?
CakePHP 2.x testsuites cannot be run directly via PHPUnit, it requires CakePHPs custom autoloader and uses a custom test runner. You have to use the CakePHP test shell instead.
./Console/cake test AclExtras
See also
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.