Exemplo n.º 1
0
 /**
  * @dataProvider getCommentsDataProvider
  */
 public function testGetComments($caseSubject, $order, $expectedCommentsMessage)
 {
     $case = $this->getContainer()->get('doctrine.orm.entity_manager')->getRepository('OroCRMCaseBundle:CaseEntity')->findOneBySubject($caseSubject);
     $this->assertNotEmpty($case);
     $comments = $this->manager->getCaseComments($case, $order);
     $this->assertCount(count($expectedCommentsMessage), $comments);
     $this->assertSame($expectedCommentsMessage, array_map(function (CaseComment $comment) {
         return $comment->getMessage();
     }, $comments));
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function createEntity()
 {
     return $this->caseManager->createCase();
 }
Exemplo n.º 3
0
 /**
  * @param CaseEntity $case
  * @param string $order
  * @return CaseComment[]
  */
 public function getCaseComments(CaseEntity $case, $order = 'DESC')
 {
     return $this->caseManager->getCaseComments($case, $order);
 }