markTestSkipped('ONLINE feed tests are not enabled'); } $this->baseUri = rtrim(constant('TESTS_ZEND_FEED_IMPORT_ONLINE_BASEURI'), '/'); Zend_Feed::setHttpClient(new Zend_Http_Client()); } public function tearDown() { if (!$this->baseUri) { return parent::tearDown(); } $basePath = dirname(__FILE__) . '/_files/'; foreach ($this->remoteFeedNames as $file) { $filename = $basePath . $file; if (!file_exists($filename)) { continue; } unlink($filename); } } public function prepareFeed($filename) { $basePath = dirname(__FILE__) . '/_files/'; $path = $basePath . $filename; $remote = str_replace('.xml', '.remote.xml', $filename); $string = file_get_contents($path); $string = str_replace('XXE_URI', $this->baseUri . '/xxe-info.txt', $string); file_put_contents($basePath . '/' . $remote, $string); return $remote; } }