index.html errorDocument.html BBBB; public function testParseValidXml() { $response = new ResponseCore(array(), $this->validXml, 200); $result = new GetWebsiteResult($response); $this->assertTrue($result->isOK()); $this->assertNotNull($result->getData()); $this->assertNotNull($result->getRawResponse()); $websiteConfig = $result->getData(); $this->assertEquals($this->cleanXml($this->validXml), $this->cleanXml($websiteConfig->serializeToXml())); } private function cleanXml($xml) { return str_replace("\n", "", str_replace("\r", "", $xml)); } public function testInvalidResponse() { $response = new ResponseCore(array(), $this->validXml, 300); try { new GetWebsiteResult($response); $this->assertTrue(false); } catch (OssException $e) { } } }