Skip to content

Commit 0f42bca

Browse files
committed
Add one more check and discover a bug in phpstan
1 parent bdd8b83 commit 0f42bca

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

spec/Proget/Tests/PHPStan/PhpSpec/BarSpec.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,11 @@ public function it_should_throw_exception(Foo $foo): void
3333

3434
$this->shouldThrow(\RuntimeException::class)->during('foo');
3535
}
36+
37+
public function it_should_call_void_one_time(Foo $foo): void
38+
{
39+
$foo->doSomething()->shouldBeCalledTimes(1);
40+
41+
$this->bar();
42+
}
3643
}

tests/Bar.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,9 @@ public function foo(): string
2424

2525
return $this->foo->foo();
2626
}
27+
28+
public function bar(): void
29+
{
30+
$this->foo->doSomething();
31+
}
2732
}

tests/Foo.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ public function foo(): string
2121
return '';
2222
}
2323

24+
public function doSomething(): void
25+
{
26+
}
27+
2428
public function makeBaz(): int
2529
{
2630
return $this->baz->make();

0 commit comments

Comments
 (0)