Пример #1
0
 function testExpectations()
 {
     $mock = new TestDummy();
     $mock->expectCallCount('anotherMethod', 2);
     $mock->expect('anotherMethod', array(77));
     $mock->expectAt(1, 'anotherMethod', array(66));
     $mock->anotherMethod(77);
     $mock->anotherMethod(66);
 }
Пример #2
0
 function testExpectations()
 {
     $mock = new TestDummy($this);
     $mock->expectCallCount("anotherMethod", 2);
     $mock->expectArguments("anotherMethod", array(77));
     $mock->expectArgumentsAt(1, "anotherMethod", array(66));
     $mock->anotherMethod(77);
     $mock->anotherMethod(66);
     $mock->tally();
 }