protected function setUp()
 {
     parent::setUp();
     $this->api = $this->getMock('OC\\AppFramework\\Core\\API', array('getAppName'), array('test'));
     $this->api->expects($this->any())->method('getAppName')->will($this->returnValue('app'));
     $this->tpl = new TemplateResponse($this->api, 'home');
 }
 public function testIsSharingEnabledWithSharingDisabled()
 {
     $this->api->expects($this->once())->method('isAppEnabled')->with('files_sharing')->will($this->returnValue(true));
     $this->appConfig->expects($this->once())->method('getValue')->with('core', 'shareapi_allow_links', 'yes')->will($this->returnValue('no'));
     $this->assertFalse(\Test_Helper::invokePrivate($this->sharingCheckMiddleware, 'isSharingEnabled'));
 }