['HTTP_ORIGIN' => 'test']], $this->createMock(IRequestId::class), $this->createMock(IConfig::class) ); $this->controller = new ChildApiController('app', $request, 'verbs', 'headers', 100); $response = $this->controller->preflightedCors(); $headers = $response->getHeaders(); $this->assertEquals('test', $headers['Access-Control-Allow-Origin']); $this->assertEquals('verbs', $headers['Access-Control-Allow-Methods']); $this->assertEquals('headers', $headers['Access-Control-Allow-Headers']); $this->assertEquals('false', $headers['Access-Control-Allow-Credentials']); $this->assertEquals(100, $headers['Access-Control-Max-Age']); } }