本文整理汇总了PHP中Doctrine\Common\Collections\ArrayCollection::expects方法的典型用法代码示例。如果您正苦于以下问题:PHP ArrayCollection::expects方法的具体用法?PHP ArrayCollection::expects怎么用?PHP ArrayCollection::expects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Doctrine\Common\Collections\ArrayCollection
的用法示例。
在下文中一共展示了ArrayCollection::expects方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testRenderTicket
public function testRenderTicket()
{
$tags = array(array('id' => 1, 'name' => 'Ticket Tag'));
$renderTagResult = '<span class="tag-inline">Ticket Tag</span>';
$this->registry->expects($this->once())->method('getRepository')->will($this->returnValue($this->sharedRepository));
$this->tagManager->expects($this->once())->method('loadTagging')->will($this->returnValue($this->tagManager));
$this->twig->expects($this->once())->method('render')->will($this->returnValue($renderTagResult));
$this->sharedRepository->expects($this->once())->method('get')->will($this->returnValue($this->ticket));
$this->ticket->expects($this->once())->method('getTags')->will($this->returnValue($this->commonCollection));
$this->commonCollection->expects($this->once())->method('getValues')->will($this->returnValue($tags));
$ticketResult = $this->renderTagExtensionExtension->renderTag($this->twig, 1, 'ticket');
$this->assertEquals($renderTagResult, $ticketResult);
}