Will also paint the page header and footer if this is the first test.
Will stash the size if the first start.
public paintCaseStart ( string $test_name ) | ||
$test_name | string | Name of test that is starting. |
/** * Paints the start of a test case. Will also paint * the page header and footer if this is the * first test. Will stash the size if the first * start. * @param string $test_name Name of test that is starting. * @access public */ public function paintCaseStart($test_name) { parent::paintCaseStart($test_name); echo '<h2>' . $test_name . '</h2>'; echo '<div class="test-reports">'; flush(); }
/** * Invokes run() on all of the held test cases, instantiating * them if necessary. * @param SimpleReporter $reporter Current test reporter. * @param int $port Port to report test results on * @access public */ function run(&$reporter, $port) { $count = count($this->_test_cases); for ($i = 0; $i < $count; $i++) { if (is_string($this->_test_cases[$i])) { $class = $this->_test_cases[$i]; $test =& new $class(); ob_start(); $reporter->paintGroupStart($this->getLabel(), $this->getSize()); $reporter->paintCaseStart($test->getLabel()); $start = ob_get_contents(); ob_end_clean(); ob_start(); $reporter->paintCaseEnd($test->getLabel()); $reporter->paintGroupEnd($this->getLabel()); $end = ob_get_contents(); ob_end_clean(); //the guts from SimpleTestCase::run($reporter) where $test->_runner = new EclipseRunner($test, $reporter, $start, $end, $port); $test->_runner->run(); $output = $start; if ($i + 1 == $count) { $output .= "<done/>"; } $output .= $end; $sock = new SimpleSocket("127.0.0.1", $port, 5); $sock->write($output); $sock->close(); echo $sock->getError(); } else { $this->_test_cases[$i]->run($reporter, $port); } } return $reporter->getStatus(); }
function paintCaseStart($test_name) { parent::paintCaseStart($test_name); print $this->_getIndent(); print "<" . $this->_namespace . "case>\n"; print $this->_getIndent(1); print "<" . $this->_namespace . "name>" . $this->toParsedXml($test_name) . "</" . $this->_namespace . "name>\n"; }
/** * Uses reflection to run every method within itself * starting with the string "test" unless a method * is specified. * @param SimpleReporter $reporter Current test reporter. * @access public */ function run(&$reporter) { $reporter->paintCaseStart($this->getLabel()); $this->_runner =& $this->_createRunner($reporter); $this->_runner->run(); $reporter->paintCaseEnd($this->getLabel()); return $reporter->getStatus(); }
function paintCaseStart($test_name) { parent::paintCaseStart($test_name); $this->runCount = 0; $this->failureCount = 0; $this->errorCount = 0; $this->timer = new Timer(); $this->timer->start(); }
public function paintCaseStart($testName) { parent::paintCaseStart($testName); echo '<table cellspacing="0" cellpadding="0">', "\n"; echo ' <tr>', "\n"; echo ' <td>', "\n"; echo ' <p class="test_heading">', $testName, '</p>', "\n"; echo ' <table cellspacing="0" class="test_output">', "\n"; echo ' <tr>', "\n"; echo ' <th>Result</td>', "\n"; echo ' <th nowrap="nowrap">Test Case</td>', "\n"; echo ' <th>Message</td>', "\n"; echo ' </tr>', "\n"; flush(); }
/** * テストケース開始 * * @access public * @param string $test_name テスト名称 */ function paintCaseStart($test_name) { parent::paintCaseStart($test_name); $this->report[] = array('type' => 'CaseStart', 'test_name' => $test_name); }
/** * Uses reflection to run every method within itself * starting with the string "test". * @param SimpleReporter $reporter Current test reporter. * @access public */ function run(&$reporter) { $reporter->paintCaseStart($this->getLabel()); $methods = get_class_methods(get_class($this)); foreach ($methods as $method) { if (!$this->_isTest($method)) { continue; } if ($this->_isConstructor($method)) { continue; } $reporter->paintMethodStart($method); $this->_reporter =& $this->_createRunner($reporter); $this->_reporter->invoke($this, $method); $reporter->paintMethodEnd($method); } $reporter->paintCaseEnd($this->getLabel()); return $reporter->getStatus(); }
/** * Uses reflection to run every method within itself * starting with the string "test". * @param SimpleReporter $reporter Current test reporter. * @access public */ function run(&$reporter) { $reporter->paintCaseStart($this->getLabel()); $methods = get_class_methods(get_class($this)); foreach ($methods as $method) { if (strtolower(substr($method, 0, 4)) != "test") { continue; } if (is_a($this, strtolower($method))) { continue; } $reporter->paintMethodStart($method); $this->_reporter =& $this->_createRunner($reporter); $this->_reporter->invoke($this, $method); $reporter->paintMethodEnd($method); } $reporter->paintCaseEnd($this->getLabel()); return $reporter->getStatus(); }
function paintCaseStart($test_name) { print "\n {$test_name}\n"; return parent::paintCaseStart($test_name); }
public function paintCaseStart($test_case) { parent::paintCaseStart($test_case); $this->results[] = array('name' => $test_case, 'methods' => array()); }
/** * Uses reflection to run every method within itself * starting with the string "test" unless a method * is specified. * @param SimpleReporter $reporter Current test reporter. * @access public */ function run(&$reporter) { SimpleTest::setCurrent($this); $reporter->paintCaseStart($this->getLabel()); $this->_runner = $this->_createRunner($reporter); $this->_runner->run(); $this->_runner = false; $reporter->paintCaseEnd($this->getLabel()); return $reporter->getStatus(); }
function paintCaseStart($test_name) { $this->buffer_case = "\n {$test_name}\n"; $this->buffer_case_displayed = false; return parent::paintCaseStart($test_name); }
/** * @param string $testName */ public function paintCaseStart($testName) { parent::paintCaseStart($testName); $this->junitXMLWriter->startTestSuite($testName, $this->suite->countTestsInTestCase(\SimpleTest::getContext()->getTest())); $this->caseStarted = true; }
/** * @param string $testName */ public function paintCaseStart($testName) { parent::paintCaseStart($testName); $this->xmlWriter->startTestSuite($testName, $this->suite->countTestsInTestCase(SimpleTest::getContext()->getTest())); }
/** * acceptor for start of test case node */ public function paintCaseStart($message) { parent::paintCaseStart($message); $node = new TreemapNode('TestCase', $message); $this->_stack->push($node); }
function paintCaseStart($test_name) { return parent::paintCaseStart($test_name); }
/** * Signals the appropriate start event on the * listener. * @param SimpleReporter $listener Target for events. * @access public */ function paintStart(&$listener) { $listener->paintCaseStart($this->getName()); }
/** * acceptor for start of test case node */ function paintCaseStart($message) { parent::paintCaseStart($message); $node = new TreemapNode("TestCase", $message); $this->stack->push($node); }