public function testCustomEditorInjectionIsPossible() { $this->authorizationChecker->method('isGranted')->with('ROLE_ADMIN')->willReturn(true); $request = new Request(); $response = new Response('<body></body>', 200, ['Content-Type' => 'text/html']); $this->event->method('getRequest')->willReturn($request); $this->event->method('getResponse')->willReturn($response); $this->event->method('isMasterRequest')->willReturn(true); $this->editor->expects($this->once())->method('renderEditor')->with($response)->willReturn(null); $this->listener->onKernelResponse($this->event); }