public function testFailedNever()
 {
     $this->test->expectOnce('assert', array(new MemberExpectation('count', 0), 1));
     $mock = new MockDummyWithInjectedTestCase();
     $mock->expectNever('aMethod');
     $mock->aMethod();
     $mock->mock->atTestEnd('testSomething', $this->test);
 }
 function testFailedNever()
 {
     $this->test->expectOnce('assert', array(new LikeExpectation(new MaximumCallCountExpectation('aMethod', 0)), 1));
     $mock = new MockDummyWithInjectedTestCase();
     $mock->expectNever('aMethod');
     $mock->aMethod();
     $mock->mock->atTestEnd('testSomething', $this->test);
 }
Beispiel #3
0
 function testFailedNever()
 {
     $this->test->expectOnce("assertTrue", array(false, '*'));
     $mock = new MockDummyWithInjectedTestCase();
     $mock->expectNever("aMethod");
     $mock->aMethod();
     $mock->atTestEnd('testSomething');
 }