factory = new EmptyResponseImplicitOptionsMiddlewareFactory(); } /** @test */ public function serviceIsCreated(): void { $instance = ($this->factory)(); self::assertInstanceOf(ImplicitOptionsMiddleware::class, $instance); } /** @test */ public function responsePrototypeIsEmptyResponse(): void { $instance = ($this->factory)(); $ref = new ReflectionObject($instance); $prop = $ref->getProperty('responseFactory'); $prop->setAccessible(true); self::assertInstanceOf(EmptyResponse::class, $prop->getValue($instance)()); } }