paintCaseEnd() public method

Will paint the page footer if the stack of tests has unwound.
public paintCaseEnd ( string $test_name )
$test_name string Name of test that is ending.
Esempio n. 1
0
 /**
  *    Paints the end of a test case. Will paint the page
  *    footer if the stack of tests has unwound.
  *    @param string $test_name   Name of test that is ending.
  *    @access public
  */
 public function paintCaseEnd($test_name)
 {
     parent::paintCaseEnd($test_name);
     //echo '<strong>Test Case: "' . $test_name . '" finished.</strong><br />';
     echo '</div>';
     flush();
 }
Esempio n. 2
0
 /**
  *    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();
 }
Esempio n. 3
0
 /**
  *    Signals the appropriate end event on the
  *    listener.
  *    @param SimpleReporter $listener    Target for events.
  *    @access public
  */
 function paintEnd(&$listener)
 {
     $listener->paintCaseEnd($this->getName());
 }
Esempio n. 4
0
 /**
  * acceptor for end of test case
  */
 public function paintCaseEnd($message)
 {
     parent::paintCaseEnd($message);
     $node = $this->_stack->pop();
     $current = $this->_stack->peek();
     if ($node->isFailed()) {
         $current->fail();
     }
     $current->putChild($node);
 }
 /**
  * @param string $testName
  */
 public function paintCaseEnd($testName)
 {
     parent::paintCaseEnd($testName);
     $this->junitXMLWriter->endTestSuite();
     $this->caseStarted = false;
 }
 /**
  *  テストケース終了
  *
  *  @access public
  *  @param string   $test_name  テスト名称
  */
 function paintCaseEnd($test_name)
 {
     parent::paintCaseEnd($test_name);
     $this->report[] = array('type' => 'CaseEnd');
 }
 function paintCaseEnd($test_name)
 {
     parent::paintCaseEnd($test_name);
     $this->timer->stop();
 }
 /**
  * @param string $testName
  */
 public function paintCaseEnd($testName)
 {
     parent::paintCaseEnd($testName);
     $this->xmlWriter->endTestSuite();
 }
 public function paintCaseEnd($testName)
 {
     parent::paintCaseEnd($testName);
     echo '                </table>', "\n";
     echo '            <br clear="all" />', "\n";
     echo '        </td>', "\n";
     echo '    </tr>', "\n";
     echo '</table>', "\n";
 }
Esempio n. 10
0
 function paintCaseEnd($test_name)
 {
     print $this->_getIndent();
     print "</" . $this->_namespace . "case>\n";
     parent::paintCaseEnd($test_name);
 }