getMockBuilder('OCP\IRequest')->getMock(); $this->controller = new PageController( 'betterphotos', $request, $this->userId ); } public function testIndex() { $result = $this->controller->index(); $this->assertEquals('index', $result->getTemplateName()); $this->assertTrue($result instanceof TemplateResponse); } }