Skip to content

Commit

Permalink
adding delete person method
Browse files Browse the repository at this point in the history
  • Loading branch information
Vagrant User committed Mar 8, 2016
1 parent 1261925 commit 4f5242a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Service/Person.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@ public function savePerson(PersonEntity $person)
return $this->getRepository()->save($person);
}

/**
* @param PersonEntity $person
* @return PersonEntity
*/
public function deletePerson(PersonEntity $person)
{
return $this->getRepository()->delete($person);
}

/**
* @param PersonCriteria $criteria
* @return array
Expand Down
1 change: 1 addition & 0 deletions tests/unit/Del/Service/PersonServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public function testSavePerson()
$person->setAka('Pollito');
$person = $this->svc->savePerson($person);
$this->assertEquals('Pollito', $person->getAka());
$this->svc->deletePerson($person);
}

/**
Expand Down

0 comments on commit 4f5242a

Please sign in to comment.