我曾经bin/cake bake plugin PluginName创建过一个插件.部分原因是它创建phpunit.xml.dist,但烘焙不会创建所需的文件夹结构或tests/bootstrap.php文件.
问题
我运行时收到"未执行测试"消息phpunit:
$ phpunit
PHPUnit 5.1.3 by Sebastian Bergmann and contributors.
Time: 239 ms, Memory: 4.50Mb
No tests executed!
Run Code Online (Sandbox Code Playgroud)
背景资料
我在我的插件文件夹下创建了我的测试tests/TestCase.我不认为它们是问题,但我会在最后发布它们.
我正在使用默认phpunit.xml.dist文件,我正在使用它tests/bootstrap.php:
$findRoot = function ($root) {
do {
$lastRoot = $root;
$root = dirname($root);
if (is_dir($root . '/vendor/cakephp/cakephp')) {
return $root;
}
} while ($root !== $lastRoot);
throw new Exception("Cannot find the root of the application, unable to run tests");
}; …Run Code Online (Sandbox Code Playgroud)