public function testShowList()
 {
     $template = new Template('activity', 'stream.app.navigation', '');
     $template->assign('activeNavigation', 'all');
     $template->assign('navigations', []);
     $template->assign('rssLink', '');
     $this->navigation->expects($this->any())->method('getTemplate')->willReturn($template);
     $templateResponse = $this->controller->showList();
     $this->assertInstanceOf('\\OCP\\AppFramework\\Http\\TemplateResponse', $templateResponse, 'Asserting type of return is \\OCP\\AppFramework\\Http\\TemplateResponse');
     $renderedResponse = $templateResponse->render();
     $this->assertNotEmpty($renderedResponse);
 }
示例#2
0
 public function testShowList()
 {
     $template = new Template('activity', 'stream.app.navigation', '');
     $template->assign('activeNavigation', 'all');
     $template->assign('navigations', []);
     $template->assign('rssLink', '');
     $this->navigation->expects($this->any())->method('getTemplate')->willReturn($template);
     $avatar = $this->getMockBuilder('OCP\\IAvatar')->disableOriginalConstructor()->getMock();
     $this->avatarManager->expects($this->once())->method('getAvatar')->willReturn($avatar);
     $avatar->expects($this->once())->method('exists')->willReturn(false);
     $templateResponse = $this->controller->showList();
     $this->assertInstanceOf('\\OCP\\AppFramework\\Http\\TemplateResponse', $templateResponse, 'Asserting type of return is \\OCP\\AppFramework\\Http\\TemplateResponse');
     $renderedResponse = $templateResponse->render();
     $this->assertNotEmpty($renderedResponse);
 }