diff --git a/tests/Unit/Libraries/Cms/Session/SessionManagerTest.php b/tests/Unit/Libraries/Cms/Session/SessionManagerTest.php index 84bfceafbf0b6..b883aa24d2f20 100644 --- a/tests/Unit/Libraries/Cms/Session/SessionManagerTest.php +++ b/tests/Unit/Libraries/Cms/Session/SessionManagerTest.php @@ -106,15 +106,9 @@ public function testDestroySessionsWithFailure() 'a2b3c4', ]; - $this->sessionHandler->expects($this->at(0)) - ->method('destroy') - ->with($sessionIds[0]) - ->willReturn(true); - - $this->sessionHandler->expects($this->at(1)) + $this->sessionHandler->expects($this->exactly(2)) ->method('destroy') - ->with($sessionIds[1]) - ->willReturn(false); + ->will($this->onConsecutiveCalls(true, false)); $this->assertFalse($this->manager->destroySessions($sessionIds)); }