From 61bb16ee2e5f0a66234e1575242169a10fde47b5 Mon Sep 17 00:00:00 2001 From: xue <> Date: Fri, 7 Jul 2006 14:54:15 +0000 Subject: Merge from 3.0 branch till 1253. --- tests/UnitTests/simpletest/remote.php | 115 ---------------------------------- 1 file changed, 115 deletions(-) delete mode 100644 tests/UnitTests/simpletest/remote.php (limited to 'tests/UnitTests/simpletest/remote.php') diff --git a/tests/UnitTests/simpletest/remote.php b/tests/UnitTests/simpletest/remote.php deleted file mode 100644 index 2639ba8c..00000000 --- a/tests/UnitTests/simpletest/remote.php +++ /dev/null @@ -1,115 +0,0 @@ -_url = $url; - $this->_dry_url = $dry_url ? $dry_url : $url; - $this->_size = false; - } - - /** - * Accessor for the test name for subclasses. - * @return string Name of the test. - * @access public - */ - function getLabel() { - return $this->_url; - } - - /** - * Runs the top level test for this class. Currently - * reads the data as a single chunk. I'll fix this - * once I have added iteration to the browser. - * @param SimpleReporter $reporter Target of test results. - * @returns boolean True if no failures. - * @access public - */ - function run($reporter) { - $browser = $this->_createBrowser(); - $xml = $browser->get($this->_url); - if (! $xml) { - trigger_error('Cannot read remote test URL [' . $this->_url . ']'); - return false; - } - $parser = $this->_createParser($reporter); - if (! $parser->parse($xml)) { - trigger_error('Cannot parse incoming XML from [' . $this->_url . ']'); - return false; - } - return true; - } - - /** - * Creates a new web browser object for fetching - * the XML report. - * @return SimpleBrowser New browser. - * @access protected - */ - function _createBrowser() { - return new SimpleBrowser(); - } - - /** - * Creates the XML parser. - * @param SimpleReporter $reporter Target of test results. - * @return SimpleTestXmlListener XML reader. - * @access protected - */ - function _createParser($reporter) { - return new SimpleTestXmlParser($reporter); - } - - /** - * Accessor for the number of subtests. - * @return integer Number of test cases. - * @access public - */ - function getSize() { - if ($this->_size === false) { - $browser = $this->_createBrowser(); - $xml = $browser->get($this->_dry_url); - if (! $xml) { - trigger_error('Cannot read remote test URL [' . $this->_dry_url . ']'); - return false; - } - $reporter = new SimpleReporter(); - $parser = $this->_createParser($reporter); - if (! $parser->parse($xml)) { - trigger_error('Cannot parse incoming XML from [' . $this->_dry_url . ']'); - return false; - } - $this->_size = $reporter->getTestCaseCount(); - } - return $this->_size; - } - } -?> \ No newline at end of file -- cgit v1.2.3