public function testParseValidXml() { $corsConfig = new CorsConfig(); $corsConfig->parseFromXml($this->validXml); $this->assertEquals($this->cleanXml($this->validXml), $this->cleanXml($corsConfig->serializeToXml())); $this->assertNotNull($corsConfig->getRules()); $this->assertNotNull($corsConfig->getRules()[0]->getAllowedHeaders()); $this->assertNotNull($corsConfig->getRules()[0]->getAllowedMethods()); $this->assertNotNull($corsConfig->getRules()[0]->getAllowedOrigins()); $this->assertNotNull($corsConfig->getRules()[0]->getExposeHeaders()); $this->assertNotNull($corsConfig->getRules()[0]->getMaxAgeSeconds()); }