muppet
2.0.0
unit testing your getters, setters, adders, removers, issers and whatevers.
to add this library to your dev dependencies use
composer require --dev wickedone/muppet
a lot has been written about the necessity of testing your getters and setters or why it shouldn't been done. from my personal perspective, testing getters and setters provide a stable level of coverage and thus the ability to pin your ci to a minimum coverage value.
this library doesn't promise to generate perfect, non failing tests out of the box (though it tries). it does however generate test classes which are easy to modify and, most importantly, are compatible with infection (i.e. not too much black magic fuckery).
$config = new Config(
'~/Code/Project/src', // base dir
'~/Code/Project/tests/Unit', // tests dir
// namespace fragments
[
'Awesome',
'Namespace',
'Tests',
'Unit',
],
'foo ' // author (optional)
);
(new Generator($config))
->generate('MyEntity')
;
because we love those...
Tests
is part of the tests namespaceplease see the muppet-bundle