From b5ecc8c3446786e7ae4d8a2ab83e3d550c6f59dd Mon Sep 17 00:00:00 2001 From: Christian Kuhn Date: Tue, 11 Jun 2024 19:16:34 +0200 Subject: [PATCH] [TASK] Happify phpstan Remove two obsolete exceptions - empty string will throw in \ReflectionClass by PHP. --- Classes/Core/BaseTestCase.php | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/Classes/Core/BaseTestCase.php b/Classes/Core/BaseTestCase.php index 6933db95..8ea5116e 100644 --- a/Classes/Core/BaseTestCase.php +++ b/Classes/Core/BaseTestCase.php @@ -39,8 +39,6 @@ abstract class BaseTestCase extends TestCase * @param bool $callAutoload whether to call any autoload function * * @return MockObject&AccessibleObjectInterface&T a mock of `$originalClassName` with access methods added - * - * @throws \InvalidArgumentException */ protected function getAccessibleMock( $originalClassName, @@ -51,10 +49,6 @@ protected function getAccessibleMock( $callOriginalClone = true, $callAutoload = true ) { - if ($originalClassName === '') { - throw new \InvalidArgumentException('$originalClassName must not be empty.', 1334701880); - } - $mockBuilder = $this->getMockBuilder($this->buildAccessibleProxy($originalClassName)) ->setConstructorArgs($arguments) ->setMockClassName($mockClassName); @@ -106,10 +100,6 @@ protected function getAccessibleMockForAbstractClass( $callAutoload = true, $mockedMethods = [] ) { - if ($originalClassName === '') { - throw new \InvalidArgumentException('$originalClassName must not be empty.', 1384268260); - } - return $this->getMockForAbstractClass( $this->buildAccessibleProxy($originalClassName), $arguments,