/** * @test */ public function addTrustedComputer_supportsTrustedComputerInterface_addTrustedComputerToken() { $user = $this->createMock('Scheb\\TwoFactorBundle\\Model\\TrustedComputerInterface'); $user->expects($this->once())->method('addTrustedComputer')->with('trustedToken', new \DateTime('2014-01-01')); $this->persister->expects($this->once())->method('persist')->with($user); $this->trustedComputerManager->addTrustedComputer($user, 'trustedToken', new \DateTime('2014-01-01')); }