/**
  * @expectedException \OCA\GalleryPlus\Environment\EnvironmentException
  */
 public function testAfterExceptionWithNonCheckException()
 {
     $message = 'fail';
     $code = Http::STATUS_NOT_FOUND;
     $exception = new EnvironmentException($message, $code);
     $this->middleware->afterException($this->controller, 'checkLinkItemIsValid', $exception);
 }
 /**
  * @PublicPage
  *
  * Sharing needs to be enabled on public pages
  *
  * @expectedException \OCA\GalleryPlus\Middleware\CheckException
  */
 public function testBeforeControllerWithSharingDisabled()
 {
     $this->mockSharingConfigTo('no');
     $this->reflector->reflect(__CLASS__, __FUNCTION__);
     $this->middleware->beforeController(__CLASS__, __FUNCTION__);
 }