public function testShouldNotCallInvalid() { $this->setExpectedException('Exception', 'Call to undefined method invalid__', 1); $model = new Model(); $model->invalid__(); }
/** * Overwrites the delete method in order to be able to check for * the expectation in the localMock in order to call the delete method * into the existing mock and avoid touching the database. * @return bool */ public function delete() { if ($this->localMock && $this->localMock->mockery_getExpectationsFor('delete')) { return $this->localMock->delete(); } return parent::delete(); }