Yes, you can, part II
Hi, Following the previous post topic regarding building your own solutions when using a package or framework is not an option, I proceed to show how CITestCase looks: The Unit Testing bespoke solution abstract class CITestCase { private $printer = null; public function __construct(OutputPrinter $printer) { $this->printer = $printer; } abstract protected function setUp(); abstract protected function tearDown(); public function run() { $results = []; $me = new ReflectionClass(get_called_class()); $batch = array_filter($me->getMethods(ReflectionMethod::IS_PROTECTED), function(ReflectionMethod $method) { return preg_match('/Test$/', $method->getName()) === 1; }); /* @var $testMethod ReflectionMethod */ foreach ($batch as $testMethod) { $this->setUp(); $results[] = ['name' => $testMethod->getName(), ...