mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2024-12-04 23:17:19 +01:00
Deprecated AbstractTestCase because it's just used to test private functions, which is a bad practice
This commit is contained in:
parent
de12df0baa
commit
8210daf7bc
@ -4,6 +4,11 @@ namespace Tests;
|
|||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kevinfrantz
|
||||||
|
*
|
||||||
|
* @deprecated Don't test private functions. Just test public functions!
|
||||||
|
*/
|
||||||
abstract class AbstractTestCase extends TestCase
|
abstract class AbstractTestCase extends TestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@ -39,6 +44,11 @@ abstract class AbstractTestCase extends TestCase
|
|||||||
$reflectionProperty->setValue($object, $value);
|
$reflectionProperty->setValue($object, $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param object $object
|
||||||
|
*
|
||||||
|
* @return \ReflectionClass
|
||||||
|
*/
|
||||||
private function getReflectionClassByObject(object &$object): \ReflectionClass
|
private function getReflectionClassByObject(object &$object): \ReflectionClass
|
||||||
{
|
{
|
||||||
return new \ReflectionClass(get_class($object));
|
return new \ReflectionClass(get_class($object));
|
||||||
|
Loading…
Reference in New Issue
Block a user