symfony bundle for the muppet generator
to add this bundle to your dev dependencies use
composer require --dev wickedone/muppet-bundle
add a wicked_one_muppet.yaml
to your config/dev
directory
wicked_one_muppet:
base_dir: '%kernel.project_dir%/src'
test_dir: '%kernel.project_dir%/tests/Unit'
fragments:
- NameSpace
- Tests
- Unit
author: john <[email protected]>
in order to generate a phpunit test for you model / entity you can run the following command
$ php bin/console muppet:generate:test Foo
where Foo.php
would be a model / entity class somewhere in you base_dir
please read the assumptions the muppet library makes regarding your models. the tests, most of the time, won't be perfect but will offer a descent starting point for a test covering your entire model / entity class.