File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed
spec/Proget/Tests/PHPStan/PhpSpec Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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 ();
You can’t perform that action at this time.
0 commit comments