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