MongolidLaravel\MongolidModel::delete PHP Method

delete() public method

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.
public delete ( ) : boolean
return boolean
    public function delete()
    {
        if ($this->localMockHasExpectationsFor('delete')) {
            return $this->getLocalMock()->delete();
        }
        return parent::delete();
    }