/** * @expectedException Application\Exceptions\NotFoundException */ public function testDeleteNonExistingUser() { $this->user->setId('NoExistsId'); $this->userMapper->delete($this->user->getId()); }