oscarricardosan / phpunitg_laravel
PHPUnit 测试管理包,用于本地环境中的多个应用。
v1.0.24
2018-04-13 14:41 UTC
Requires
- nette/reflection: ^2.4
This package is not auto-updated.
Last update: 2024-09-29 03:52:42 UTC
README
用于 https://github.com/oscarricardosan/phpunitg-laravel-dashboard 的客户端包。
安装
- 在您的终端中
$ composer require --dev oscarricardosan/phpunitg_laravel
- 当您使用 https://github.com/oscarricardosan/phpunitg-laravel-dashboard 注册应用程序时,它会生成一个令牌,您必须将其放入应用程序的 .env 文件中。
PHPUNITG_TOKEN=Generated_token
- 将服务提供者添加到您的 config/app.php 文件中
\Oscarricardosan\PhpunitgLaravel\OscarricardosanPhpunitgServiceProvider::class
- 选择您想要扫描的测试,并在 PHPDoc 注释中放置 @phpunitG,这样您就指示该包该类必须被扫描。
可选的,在 @phpunitG 之后,您可以放置作为标签名的文本,如果不放置,它将保持为 "无标签"。
<?php namespace App; /** * @phpunitG Tag name */ class ExampleTest extends TestCase{...My code...}
- 在将被扫描的方法中放置 @test
/** * @test */ public function is_index_working(){...My code...}