Ejemplo n.º 1
0
 public function testShouldNotCallInvalid()
 {
     $this->setExpectedException('Exception', 'Call to undefined method invalid__', 1);
     $model = new Model();
     $model->invalid__();
 }
Ejemplo n.º 2
0
 /**
  * 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();
 }