delete() public method

Deletes this object in database.
public delete ( ) : boolean
return boolean Success
 public function testDeleteShouldReturnFalseIfCollectionIsNull()
 {
     $this->assertFalse($this->entity->delete());
 }
 /**
  * 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->localMockHasExpectationsFor('delete')) {
         return $this->getLocalMock()->delete();
     }
     return parent::delete();
 }