Esempio n. 1
0
 public function testGetUsersRecipientsList()
 {
     $this->assertTrue($this->entity->getRecipientUsersList()->isEmpty());
     $userMock1 = $this->getMock('Oro\\Bundle\\UserBundle\\Entity\\User');
     $userMock2 = $this->getMock('Oro\\Bundle\\UserBundle\\Entity\\User');
     $collection = new ArrayCollection(array($userMock1, $userMock2));
     $list = $this->getMock('Oro\\Bundle\\NotificationBundle\\Entity\\RecipientList');
     $list->expects($this->once())->method('getUsers')->will($this->returnValue($collection));
     $this->entity->setRecipientList($list);
     $actual = $this->entity->getRecipientUsersList();
     $this->assertInstanceOf('Doctrine\\Common\\Collections\\ArrayCollection', $actual);
     $this->assertEquals($collection, $actual);
 }