function testGeneratesErrorOnlyWhenCallSignatureMatches() { $mock = new MockDummy(); $mock->errorOn('aMethod', 'Ouch!', array(3)); $mock->aMethod(1); $mock->aMethod(2); $this->expectError(); $mock->aMethod(3); }