dummyGetResponsePlugin = new DummyGetResponsePlugin(); } public function testInitialize(): void { $server = $this->createMock(Server::class); $server ->expects($this->once()) ->method('on') ->with('method:GET', [$this->dummyGetResponsePlugin, 'httpGet'], 200); $this->dummyGetResponsePlugin->initialize($server); } public function testHttpGet(): void { /** @var \Sabre\HTTP\RequestInterface $request */ $request = $this->createMock(RequestInterface::class); /** @var \Sabre\HTTP\ResponseInterface $response */ $response = $this->createMock(ResponseInterface::class); $response ->expects($this->once()) ->method('setBody'); $response ->expects($this->once()) ->method('setStatus') ->with(200); $this->assertSame(false, $this->dummyGetResponsePlugin->httpGet($request, $response)); } }