Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

wickedOne/muppet-bundle

Repository files navigation

muppet-bundle

symfony bundle for the muppet generator

Mutation testing badge codecov PHPStan static analysis coding standards

installation

to add this bundle to your dev dependencies use

composer require --dev wickedone/muppet-bundle

configuration

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 <john.doe@example.com>

generation

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

test files

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.