laratutor / nova-agile-testdox
一个用于在 Laravel Nova 中显示 Agile testdox 的 Laravel 工具。
v1.0.0
2018-09-10 00:45 UTC
Requires
- php: >=7.1.0
- phpunit/phpunit: ^7.3
This package is auto-updated.
Last update: 2024-09-10 14:09:59 UTC
README
描述
查看由 PHPUnit 生成并直接在 Laravel Nova 中显示的你的测试的 Agile Testdox!
注意:此假设你将 phpunit.xml
放在了默认位置(项目根目录)并且没有移动它。
工作原理
PHPUnit 将自动根据类和方法名称为你生成 Testdox。或者,你可以使用 @testdox
注解来覆盖生成的字符串,如“更新帖子”测试所示。你还可以将注解放在测试方法上。有关更多信息,请参阅 Agile Testdox 文档。
安装
首先,安装该包
composer require laratutor/nova-agile-testdox
然后,将其添加到你的 app/Providers/NovaServiceProvider.php
文件中 tools()
方法内的数组中
namespace App\Providers; ... use Laratutor\NovaAgileTestdox\NovaAgileTestdox; ... /** * Get the tools that should be listed in the Nova sidebar. * * @return array */ public function tools() { return [ new NovaAgileTestdox, ]; }