public function test_calling_mock_with_one_expectation_less_times_than_expected() { $mock = new Mock('Test'); $mock->expects('method')->with("param1")->times(2)->returns("returned data"); $this->assertEquals("returned data", $mock->method("param1")); $this->setExpectedException('\\Pt\\MockException', "[Test]\n\nMethod (method) expected to be called 2 times, but called 1"); $mock->verify(); }