Пример #1
0
 function testMinCalls()
 {
     $this->test->expectOnce('assert', array(new LikeExpectation(new MinimumCallCountExpectation('aMethod', 2)), 2));
     $mock = new MockDummyWithInjectedTestCase();
     $mock->expectMinimumCallCount('aMethod', 2);
     $mock->aMethod();
     $mock->aMethod();
     $mock->mock->atTestEnd('testSomething', $this->test);
 }
Пример #2
0
 function testMinCalls()
 {
     $this->test->expectOnce("assertTrue", array(true, '*'));
     $mock = new MockDummyWithInjectedTestCase();
     $mock->expectMinimumCallCount("aMethod", 2);
     $mock->aMethod();
     $mock->aMethod();
     $mock->atTestEnd('testSomething');
 }