/** * When the method doesn't exist then throw exception. * @expectedException \BadMethodCallException * @expectedExceptionMessage Method not found on object tests\ClassHelper\UnderTestCall. */ public function testWhenTheMethodDoesnTExistThenThrowException() { $this->instance->call('getNonexistingMethod'); }