Skip to content

Commit

Permalink
Remove problematic test case and revert baseline
Browse files Browse the repository at this point in the history
  • Loading branch information
jseparovic1 committed Mar 7, 2024
1 parent 6ad823e commit 81e1b4f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 23 deletions.
8 changes: 4 additions & 4 deletions phpstan-without-extension-baseline.neon
Expand Up @@ -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

-
Expand Down
19 changes: 0 additions & 19 deletions test/StaticAnalysis/Test/ObjectProphecy/ProphesizeTest.php
Expand Up @@ -16,7 +16,6 @@
use JanGregor\Prophecy\Test\StaticAnalysis\Src;
use PHPUnit\Framework;
use Prophecy\Argument;
use Prophecy\Prophet;

/**
* @internal
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 81e1b4f

Please sign in to comment.