summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/selenium/php/selenium.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/FunctionalTests/selenium/php/selenium.php')
-rw-r--r--tests/FunctionalTests/selenium/php/selenium.php31
1 files changed, 12 insertions, 19 deletions
diff --git a/tests/FunctionalTests/selenium/php/selenium.php b/tests/FunctionalTests/selenium/php/selenium.php
index a06a6eab..33dc8801 100644
--- a/tests/FunctionalTests/selenium/php/selenium.php
+++ b/tests/FunctionalTests/selenium/php/selenium.php
@@ -142,9 +142,9 @@ class SeleniumTestTrace
{
$group = array_pop($trace);
$info = $trace[3];
- $test = $group['args'][0]->getTestStack();
+ $test = $group['args'][0]->getTestList();
$i = count($test);
- $name = $test[1].'::'.$test[$i-1];
+ $name = $test[$i-2].'::'.$test[$i-1];
$suite = $test[0];
unset($info['object']);
for($i = 0; $i < count($info['args']); $i++)
@@ -158,14 +158,6 @@ class SeleniumTestTrace
}
}
-class SeleniumReporter extends SimpleReporter
-{
- function getTestStack()
- {
- return $this->_test_stack;
- }
-}
-
class SimpleSeleniumProxyServer// extends SeleniumProxyServer
{
protected $runner;
@@ -250,8 +242,7 @@ class SeleniumTestSuiteWriter
$contents = <<<EOD
<html>
<head>
-<meta content="text/html; charset=ISO-8859-1"
-http-equiv="content-type">
+<meta content="text/html; charset=UTF-8" http-equiv="content-type">
<title>Test Suite</title>
</head>
@@ -287,19 +278,18 @@ EOD;
foreach($this->suites as $name => $suite)
{
$name = $name;
- $contents .= "prado_trace['{$name}'] = new Array();\n";
+ $contents .= "prado_trace['{$name}'] = [";
+ $cases = array();
foreach($suite as $testcase)
- {
- $trace = addslashes(htmlspecialchars(serialize($testcase['trace'])));
- $contents .= "prado_trace['{$name}'].push('{$trace}')\n";
- }
+ $cases[] = "'".addslashes(htmlspecialchars(serialize($testcase['trace'])))."'";
+ $contents .= implode(",\n", $cases)."];\n\n";
}
return $contents;
}
protected function renderFooter()
{
- $trace = $this->getJsTraceInfo();
+ $trace = '';//$this->getJsTraceInfo();
$contents = <<<EOD
</tbody>
</table>
@@ -333,7 +323,7 @@ class SeleniumTestCaseWriter
<html>
<head>
<title>{$this->case}</title>
- <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
+ <meta content="text/html; charset=UTF-8" http-equiv="content-type">
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1" id=TABLE1>
@@ -351,6 +341,8 @@ EOD;
foreach($this->tests as $test)
{
$t = explode('|', $test['test']);
+ if($t[1] == "open")
+ $t[2] = "<a href=\"{$t[2]}\" target=\"_blank\">{$t[2]}</a>";
echo "<tr>\n";
echo "<td>{$t[1]}</td>\n";
echo "<td>{$t[2]}</td>\n";
@@ -464,6 +456,7 @@ class SeleniumTestCase extends UnitTestCase
$server = SimpleSeleniumProxyServer::getInstance();
if(!is_null($server))
$this->selenium = $server->proxy();
+ parent::__construct();
}
public function initPage($file)