예제 #1
0
 public function testFindPersonConversations()
 {
     $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->findPersonConversations($person);
     $this->assertInstanceOf('Doctrine\\Common\\Collections\\Collection', $fetched);
     $this->assertCount(1, $fetched);
     $this->assertInstanceOf(get_class($conversation), $fetched[0]);
     $this->assertEquals($conversation->getSubject(), $fetched[0]->getSubject());
 }
예제 #2
0
 /**
  * {@inheritdoc}
  */
 public function getPersonConversations(PersonInterface $person, $tag = null)
 {
     return $this->driver->findPersonConversations($person, $tag);
 }