本文整理匯總了PHP中SimpleReporter::paintMethodStart方法的典型用法代碼示例。如果您正苦於以下問題:PHP SimpleReporter::paintMethodStart方法的具體用法?PHP SimpleReporter::paintMethodStart怎麽用?PHP SimpleReporter::paintMethodStart使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類SimpleReporter
的用法示例。
在下文中一共展示了SimpleReporter::paintMethodStart方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: paintMethodStart
function paintMethodStart($test_name)
{
parent::paintMethodStart($test_name);
print $this->_getIndent();
print "<" . $this->_namespace . "test>\n";
print $this->_getIndent(1);
print "<" . $this->_namespace . "name>" . $this->toParsedXml($test_name) . "</" . $this->_namespace . "name>\n";
}
示例2: paintStart
/**
* Signals the appropriate start event on the
* listener.
* @param SimpleReporter $listener Target for events.
* @access public
*/
function paintStart(&$listener)
{
$listener->paintMethodStart($this->getName());
}
示例3: paintMethodStart
/**
* acceptor for start of test method node
*/
public function paintMethodStart($message)
{
parent::paintMethodStart($message);
$node = new TreemapNode('Method', $message);
$this->_stack->push($node);
}
示例4: paintMethodStart
/**
* Paints the beginning of a test method being run. This is used
* to start/resume the code coverage tool.
*
* @param string $method The method name being run.
* @return void
*/
function paintMethodStart($method)
{
parent::paintMethodStart($method);
if (!empty($this->params['codeCoverage'])) {
CodeCoverageManager::start();
}
}
示例5: paintMethodStart
/**
* @param string $testName
*/
public function paintMethodStart($testName)
{
$this->caseIsArtificial = false;
if (!$this->caseStarted) {
$this->paintCaseStart(\SimpleTest::getContext()->getTest()->getLabel());
$this->caseIsArtificial = true;
}
parent::paintMethodStart($testName);
$this->junitXMLWriter->startTestCase($testName, \SimpleTest::getContext()->getTest());
$this->methodStartTime = microtime(true);
$this->assertionCount = 0;
$this->reportedFailure = false;
$this->methodStarted = true;
}
示例6: run
/**
* 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();
}
示例7: paintMethodStart
function paintMethodStart($test_name)
{
parent::paintMethodStart($test_name);
$this->currentTest = $test_name;
}
示例8: run
/**
* 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();
}
示例9: paintMethodStart
/**
* @param string $testName
*/
public function paintMethodStart($testName)
{
parent::paintMethodStart($testName);
$this->xmlWriter->startTestCase($testName, SimpleTest::getContext()->getTest());
$this->methodStartTime = microtime(true);
$this->assertionCount = 0;
}
示例10: paintMethodStart
public function paintMethodStart($method)
{
parent::paintMethodStart($method);
/* this one is PHP 5.2+
$this->method_status = array_fill_keys(array_keys($this->method_status), 0); // reset method status
*/
$this->method_status = array_combine(array_keys($this->method_status), array_fill(0, sizeof($this->method_status), array()));
// reset method status
ob_start();
$this->start_time = microtime(true);
$this->start_memory = memory_get_usage();
}
示例11: paintMethodStart
/**
* Paints the start of a test method.
* @param string $test_name Name of test that is starting.
* @access public
*/
public function paintMethodStart($test_name)
{
parent::paintMethodStart($test_name);
//echo '<h3>' . $test_name . '</h3>';
flush();
}
示例12: paintMethodStart
/**
* acceptor for start of test method node
*/
function paintMethodStart($message)
{
parent::paintMethodStart($message);
$node = new TreemapNode("Method", $message);
$this->stack->push($node);
}