function testSpecificSequence() { $mock = new MockDummyWithInjectedTestCase(); $mock->expectArgumentsAt(1, "aMethod", array(1, 2, 3)); $mock->expectArgumentsAt(2, "aMethod", array("Hello")); $mock->aMethod(); $mock->aMethod(1, 2, 3); $mock->aMethod("Hello"); $mock->aMethod(); $mock->atTestEnd('testSomething', $this->test); }
function testFailedSequence() { $this->test->expectArguments("assertTrue", array(false, "*")); $this->test->expectCallCount("assertTrue", 2); $mock = new MockDummyWithInjectedTestCase(); $mock->expectArgumentsAt(0, "aMethod", array(1, 2, 3)); $mock->expectArgumentsAt(1, "aMethod", array("Hello")); $mock->aMethod(1, 2); $mock->aMethod("Goodbye"); $mock->atTestEnd('testSomething'); }