From 81e1b4fc4aca6128083fbb04c2e2ff4038864ce9 Mon Sep 17 00:00:00 2001 From: Jurica Separovic Date: Thu, 7 Mar 2024 17:44:21 +0100 Subject: [PATCH] Remove problematic test case and revert baseline --- phpstan-without-extension-baseline.neon | 8 ++++---- .../Test/ObjectProphecy/ProphesizeTest.php | 19 ------------------- 2 files changed, 4 insertions(+), 23 deletions(-) diff --git a/phpstan-without-extension-baseline.neon b/phpstan-without-extension-baseline.neon index a66a215..9466479 100644 --- a/phpstan-without-extension-baseline.neon +++ b/phpstan-without-extension-baseline.neon @@ -22,22 +22,22 @@ parameters: - message: "#^Call to an undefined method Prophecy\\\\Prophecy\\\\ObjectProphecy\\:\\:doubleTheNumber\\(\\)\\.$#" - count: 2 + count: 1 path: test/StaticAnalysis/Test/ObjectProphecy/ProphesizeTest.php - message: "#^Call to an undefined method Prophecy\\\\Prophecy\\\\ObjectProphecy\\:\\:getFoo\\(\\)\\.$#" - count: 2 + count: 1 path: test/StaticAnalysis/Test/ObjectProphecy/ProphesizeTest.php - message: "#^Call to an undefined method object\\:\\:doubleTheNumber\\(\\)\\.$#" - count: 2 + count: 1 path: test/StaticAnalysis/Test/ObjectProphecy/ProphesizeTest.php - message: "#^Call to an undefined method object\\:\\:getFoo\\(\\)\\.$#" - count: 2 + count: 1 path: test/StaticAnalysis/Test/ObjectProphecy/ProphesizeTest.php - diff --git a/test/StaticAnalysis/Test/ObjectProphecy/ProphesizeTest.php b/test/StaticAnalysis/Test/ObjectProphecy/ProphesizeTest.php index 559d799..edcc659 100644 --- a/test/StaticAnalysis/Test/ObjectProphecy/ProphesizeTest.php +++ b/test/StaticAnalysis/Test/ObjectProphecy/ProphesizeTest.php @@ -16,7 +16,6 @@ use JanGregor\Prophecy\Test\StaticAnalysis\Src; use PHPUnit\Framework; use Prophecy\Argument; -use Prophecy\Prophet; /** * @internal @@ -84,24 +83,6 @@ public function testCreateProphecyInHelperMethod(): void self::assertEquals(5, $testDouble->doubleTheNumber(2)); } - public function testCreateProphecyInline(): void - { - $prophecy = (new Prophet())->prophesize(Src\BaseModel::class); - - $prophecy - ->getFoo() - ->willReturn('bar'); - - $prophecy - ->doubleTheNumber(Argument::is(2)) - ->willReturn(5); - - $testDouble = $prophecy->reveal(); - - self::assertEquals('bar', $testDouble->getFoo()); - self::assertEquals(5, $testDouble->doubleTheNumber(2)); - } - private function createProphecy() { return $this->prophesize(Src\BaseModel::class);