kch/unittest-generator-entity

实体简单单元测试生成器

安装量: 4,266

依赖项: 0

建议者: 0

安全: 0

类型:symfony-bundle

dev-master 2018-08-06 11:26 UTC

This package is not auto-updated.

Last update: 2024-09-24 17:27:18 UTC


README

实体

该Bundle用于生成实体的简单单元测试。

您只需要传递实体命名空间

$ bin/console unit-tests:generate:entity <entity_namespace>

它将在 Bundle/Tests/ 目录中创建具有实体名称的简单单元测试。

!!! 只需记住转义反斜杠 !!!

安装

对于Symfony框架 >= 2.3

使用composer要求该Bundle及其依赖项

$ composer require kch/unittest-generator-entity

注册Bundle

// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        new KCH\Bundle\UnitTests\Generator\EntityBundle\UnitTestsGeneratorEntityBundle(),
    );
}

享受!