예제 #1
0
 public function testFindConversationPerson()
 {
     $person = $this->createPerson();
     $conversation = $this->driver->createConversationModel();
     $conversation->setSubject('Subject');
     $this->driver->persistConversation($conversation);
     $personModel = $this->driver->createConversationPersonModel($conversation, $person);
     $this->driver->persistConversationPerson($personModel);
     $this->driver->flush();
     $fetched = $this->driver->findConversationPerson($conversation, $person);
     $this->assertInstanceOf(get_class($personModel), $fetched);
     $this->assertEquals($personModel->getConversation(), $conversation);
     $this->assertEquals($personModel->getPerson(), $person);
 }
예제 #2
0
 /**
  * {@inheritdoc}
  */
 public function getConversationPerson(ConversationInterface $conversation, PersonInterface $person)
 {
     return $this->driver->findConversationPerson($conversation, $person);
 }