コード例 #1
0
ファイル: ModelTest.php プロジェクト: ronnysuero/devsfarm
 public function testShouldNotCallInvalid()
 {
     $this->setExpectedException('Exception', 'Call to undefined method invalid__', 1);
     $model = new Model();
     $model->invalid__();
 }
コード例 #2
0
ファイル: MongoLid.php プロジェクト: ronnysuero/devsfarm
 /**
  * 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();
 }