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