tomasz-kr / unittest-generator-entity
为您的项目生成简单的phpunit测试。
dev-php7.1
2018-02-12 22:19 UTC
Requires
- php: >=7.1.0
This package is auto-updated.
Last update: 2024-09-13 15:53:50 UTC
README
实体
Bundle 用于生成实体的简单单元测试。
您需要传递的只有实体命名空间
Symfony 3.3
$ php bin/console unit-tests:generate:entity "<entity_namespace>"
使用
$ php bin/console unit-tests:generate:entity "AppBundle\Entity\MyEntity"
它将在 Bundle/Tests/ 目录、tests/ 或项目中的路径下创建具有实体名称的简单单元测试。
!!! 记得转义反斜杠 !!!
安装
对于 Symfony 框架 >= 3.3
使用 composer 需要此捆绑包及其依赖项
$ composer require tomasz-kr/unittest-generator-entity
注册捆绑包
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
new KCH\Bundle\UnitTests\Generator\EntityBundle\UnitTestsGeneratorEntityBundle(),
);
}
贡献者
许可证
MIT