public function __construct()
 {
     parent::__construct();
     $this->cors = new CrossOriginResourceSharingHeaderHelper();
     $this->cors->readConfig();
     $this->setOutputFieldTypes(["width" => self::OUTPUT_FIELD_CAST_NULLS | self::OUTPUT_FIELD_TYPE_INT, "height" => self::OUTPUT_FIELD_CAST_NULLS | self::OUTPUT_FIELD_TYPE_INT]);
 }
 public function testShouldProperlyReadCORSConfigFromGlobal()
 {
     global $wgCORSAllowOrigin;
     $wgCORSAllowOrigin = ["a", "b", "c"];
     $dummyResponse = new WikiaResponse("tmp");
     $cors = new CrossOriginResourceSharingHeaderHelper();
     $cors->readConfig()->setHeaders($dummyResponse);
     $headers = $dummyResponse->getHeader(CrossOriginResourceSharingHeaderHelper::ALLOW_ORIGIN_HEADER_NAME);
     $this->assertEquals($headers[0]['value'], 'a,b,c');
 }
 public function __construct()
 {
     parent::__construct();
     $this->cors = new CrossOriginResourceSharingHeaderHelper();
     $this->cors->readConfig();
 }