Skip to content

Commit faf59d0

Browse files
committed
qa: use shouldBeCalledTimes(1) versus shouldBeCalledOnce()
The latter is only available starting in 1.8.0, while the former is available in all versions.
1 parent bf877ce commit faf59d0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/CommonDispatcherTests.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function testDispatchNotifiesAllRelevantListenersAndReturnsEventWhenNoErr
4040
$this->getListenerProvider()
4141
->getListenersForEvent($event)
4242
->willReturn($listeners)
43-
->shouldBeCalledOnce();
43+
->shouldBeCalledTimes(1);
4444

4545
$dispatcher = $this->getDispatcher();
4646

@@ -91,7 +91,7 @@ public function isPropagationStopped() : bool
9191
$this->getListenerProvider()
9292
->getListenersForEvent($event)
9393
->willReturn($listeners)
94-
->shouldBeCalledOnce();
94+
->shouldBeCalledTimes(1);
9595

9696
$dispatcher = $this->getDispatcher();
9797

test/ErrorEmittingDispatcherTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ public function testDispatchesErrorEventIfAListenerRaisesAnExceptionAndThenReThr
5858
$this->provider
5959
->getListenersForEvent($event)
6060
->willReturn([$errorRaisingListener])
61-
->shouldBeCalledOnce();
61+
->shouldBeCalledTimes(1);
6262

6363
$this->provider
6464
->getListenersForEvent(Argument::type(ErrorEvent::class))
6565
->willReturn([$errorListener])
66-
->shouldBeCalledOnce();
66+
->shouldBeCalledTimes(1);
6767

6868
$this->expectException(RuntimeException::class);
6969
$this->expectExceptionMessage('TRIGGERED');

0 commit comments

Comments
 (0)