Deprecated AbstractTestCase because it's just used to test private functions, which is a bad practice

This commit is contained in:
Kevin Frantz 2019-05-30 19:13:15 +02:00
parent de12df0baa
commit 8210daf7bc

View File

@ -4,6 +4,11 @@ namespace Tests;
use PHPUnit\Framework\TestCase;
/**
* @author kevinfrantz
*
* @deprecated Don't test private functions. Just test public functions!
*/
abstract class AbstractTestCase extends TestCase
{
/**
@ -39,6 +44,11 @@ abstract class AbstractTestCase extends TestCase
$reflectionProperty->setValue($object, $value);
}
/**
* @param object $object
*
* @return \ReflectionClass
*/
private function getReflectionClassByObject(object &$object): \ReflectionClass
{
return new \ReflectionClass(get_class($object));