Commit 93f452cd authored by jackbravo's avatar jackbravo

Separate correctly test messages when running from the browser, and get the variables through _GET

parent 543cd86f
...@@ -375,7 +375,7 @@ class MyReporter extends HtmlReporter { ...@@ -375,7 +375,7 @@ class MyReporter extends HtmlReporter {
print '<pre>'; print '<pre>';
foreach ($this->_test->getMessages() as $message) { foreach ($this->_test->getMessages() as $message) {
print $message; print "<p>$message</p>";
} }
print '</pre>'; print '</pre>';
$colour = ($this->_test->getFailCount() > 0 ? 'red' : 'green'); $colour = ($this->_test->getFailCount() > 0 ? 'red' : 'green');
...@@ -394,13 +394,14 @@ class MyReporter extends HtmlReporter { ...@@ -394,13 +394,14 @@ class MyReporter extends HtmlReporter {
<?php <?php
if (PHP_SAPI === 'cli') { if (PHP_SAPI === 'cli') {
$reporter = new CliReporter(); $reporter = new CliReporter();
$argv = $_SERVER['argv'];
array_shift($argv);
$options = parseOptions($argv);
} else { } else {
$options = $_GET;
$reporter = new MyReporter(); $reporter = new MyReporter();
} }
$argv = isset($_SERVER['argv']) ? $_SERVER['argv'] : array();
array_shift($argv);
$options = parseOptions($argv);
if (isset($options['group'])) { if (isset($options['group'])) {
$testGroup = new GroupTest('Custom'); $testGroup = new GroupTest('Custom');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment