tomasz-kr / unittest-generator-entity
Generate simple phpunit test for your project.
dev-php7.1
2018-02-12 22:19 UTC
Requires
- php: >=7.1.0
This package is auto-updated.
Last update: 2024-04-13 14:55:58 UTC
README
Entity
Bundle is used to generate simple unit tests of Entities.
The only thing you need to pass is the Entity namespace:
Symfony 3.3
$ php bin/console unit-tests:generate:entity "<entity_namespace>"
Used
$ php bin/console unit-tests:generate:entity "AppBundle\Entity\MyEntity"
It will create simple unit test with Entity name in Bundle/Tests/ directory or tests/ or your path in project.
!!! Just remember to escape backslashes !!!
Installation
For Symfony Framework >= 3.3
Require the bundle and its dependencies with composer:
$ composer require tomasz-kr/unittest-generator-entity
Register the bundle:
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
new KCH\Bundle\UnitTests\Generator\EntityBundle\UnitTestsGeneratorEntityBundle(),
);
}
Contributors
License
MIT