public function testBeforeControllerAsSubAdminWithExemption() { $this->reflector->expects($this->once())->method('hasAnnotation')->with('NoSubadminRequired')->will($this->returnValue(true)); $this->subadminMiddlewareAsSubAdmin->beforeController($this->controller, 'foo'); }