From 8210daf7bcf74a1cc4986bed5df6448e6fdf9092 Mon Sep 17 00:00:00 2001 From: Kevin Frantz Date: Thu, 30 May 2019 19:13:15 +0200 Subject: [PATCH] Deprecated AbstractTestCase because it's just used to test private functions, which is a bad practice --- application/symfony/tests/AbstractTestCase.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/application/symfony/tests/AbstractTestCase.php b/application/symfony/tests/AbstractTestCase.php index 8e5bb10..35cb18e 100644 --- a/application/symfony/tests/AbstractTestCase.php +++ b/application/symfony/tests/AbstractTestCase.php @@ -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));