예제 #1
0
 public function persist(PrivateMessage $msg)
 {
     if (!$msg->getSender()->isEqual($this->getAuthor())) {
         throw new AccessDeniedException("You cannot save this message because you're not the sender");
     }
     $this->repository->persist($msg);
 }
예제 #2
0
 public function testVertices()
 {
     $this->assertEquals($this->sender, $this->sut->getSender());
     $this->assertEquals($this->target, $this->sut->getTarget());
 }