function testNonArrayForExpectedParametersGivesError() { $mock = new MockDummyWithInjectedTestCase(); $mock->expect("aMethod", "foo"); $this->assertErrorPattern('/\\$args.*not an array/i'); $mock->aMethod(); $mock->tally(); $mock->_mock->atTestEnd('testSomething', $this->test); }
function testBadArgParameter() { $mock = new MockDummyWithInjectedTestCase(); $mock->expectArguments("aMethod", "foo"); $this->assertErrorPattern('/\\$args.*not an array/i'); $mock->aMethod(); $mock->tally(); $mock->atTestEnd('testSomething', $this->test); }