diff --git a/tests/run.php b/tests/run.php index 220bee332..b1bed63eb 100644 --- a/tests/run.php +++ b/tests/run.php @@ -97,27 +97,40 @@ $test->addTestCase(new Doctrine_EventListener_Chain_TestCase()); //$test->addTestCase(new Doctrine_Cache_SqliteTestCase()); class MyReporter extends HtmlReporter { - public function paintHeader() {} - public function paintFooter() - { - $colour = ($this->getFailCount() + $this->getExceptionCount() > 0 ? "red" : "green"); - print "
"; - print $this->getTestCaseProgress() . "/" . $this->getTestCaseCount(); - print " test cases complete:\n"; - print "" . $this->getPassCount() . " passes, "; - print "" . $this->getFailCount() . " fails and "; - print "" . $this->getExceptionCount() . " exceptions."; - print "
\n"; - } + public function paintHeader() {} + public function paintFooter() + { + $colour = ($this->getFailCount() + $this->getExceptionCount() > 0 ? "red" : "green"); + print "
"; + print $this->getTestCaseProgress() . "/" . $this->getTestCaseCount(); + print " test cases complete:\n"; + print "" . $this->getPassCount() . " passes, "; + print "" . $this->getFailCount() . " fails and "; + print "" . $this->getExceptionCount() . " exceptions."; + print "
\n"; + } } if (TextReporter::inCli()) { + if ($argc == 4) + { + $dsn = $argv[1]; + $username = $argv[2]; + $password = $argv[3]; + } exit ($test->run(new TextReporter()) ? 0 : 1); +} else { + if (isset($_POST)) + { + $dsn = $_POST['dsn']; + $username = $_POST['username']; + $password = $_POST['password']; + } + $test->run(new MyReporter()); + $output = ob_get_clean(); } -$test->run(new MyReporter()); -$output = ob_get_clean(); /** $cache = Doctrine_Manager::getInstance()->getCurrentConnection()->getCacheHandler(); if(isset($cache)) { @@ -158,6 +171,11 @@ if(isset($cache)) { Password + +   + + +

Tests