本文整理汇总了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);
}