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); }