function testTwoCallsVerifiedWithAtLeastOncePassesVerificationAgainstNoMoreInteractions()
 {
     $mock = Phockito::mock(self::MOCK_CLASS);
     $mock->Foo();
     $mock->Foo();
     Phockito::verify($mock, Phockito::atLeastOnce())->Foo();
     Phockito::verifyNoMoreInteractions($mock);
 }
Exemplo n.º 2
0
 /**
  * @expectedException \\Phockito\\Phockito\\Test\\VerificationFailure
  */
 function testNoCallsCorrectlyFailsVerificationAgainstAtLeastOnce()
 {
     $this->setExpectedException(VerificationFailure::class);
     $mock = Phockito::mock(MockMe::class);
     Phockito::verify($mock, Phockito::atLeastOnce())->Foo();
 }