tomasz-kr/unittest-generator-entity

为您的项目生成简单的phpunit测试。

安装: 18

依赖: 0

建议者: 0

安全: 0

类型:symfony-bundle

dev-php7.1 2018-02-12 22:19 UTC

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(),
    );
}

贡献者

Tomasz Król

许可证

MIT

分支

原始存储库