updating test suite layout

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4439 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2007-02-04 03:59:55 +00:00
parent e553512c05
commit 50c24a738e
6 changed files with 29 additions and 36 deletions

View file

@ -189,7 +189,10 @@ if(isset($_GET['output']) && $_GET['output'] == 'html') {
break; break;
} }
} }
CakePHPTestHeader();
CakePHPTestSuiteHeader();
if (isset($_GET['group'])) { if (isset($_GET['group'])) {
if ('all' == $_GET['group']) { if ('all' == $_GET['group']) {
TestManager::runAllTests(CakeTestsGetReporter()); TestManager::runAllTests(CakeTestsGetReporter());
@ -212,9 +215,6 @@ if(isset($_GET['output']) && $_GET['output'] == 'html') {
exit(); exit();
} }
CakePHPTestHeader();
CakePHPTestSuiteHeader();
if (isset($_GET['show']) && $_GET['show'] == 'cases') { if (isset($_GET['show']) && $_GET['show'] == 'cases') {
CakePHPTestCaseList(); CakePHPTestCaseList();
} else { } else {

View file

@ -51,19 +51,6 @@ class CakeHtmlReporter extends HtmlReporter {
function paintHeader($testName) { function paintHeader($testName) {
$this->sendNoCacheHeaders(); $this->sendNoCacheHeaders();
$baseUrl = BASE_URL; $baseUrl = BASE_URL;
print "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
print "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n";
print "<head>\n";
print "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=" . $this->_character_set . "\" />\n";
print "<title>CakePHP(tm) Test Suite v 1.2.0.0 :: $testName</title>\n";
print "<link rel=\"stylesheet\" type=\"text/css\" href=\"$baseUrl/css/cake.generic.css\" />\n";
print "<style type=\"text/css\">\n";
print $this->_getCss() . "\n";
print "</style>\n";
print "</head>\n<body>\n";
print "<div id=\"wrapper\">\n";
print "<div id=\"content\">\n";
print "<h1>CakePHP(tm) Test Suite v 1.2.0.0</h1>\n";
print "<h2>$testName</h2>\n"; print "<h2>$testName</h2>\n";
flush(); flush();
} }

View file

@ -27,9 +27,8 @@
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
*/ */
?> ?>
<div id="wrapper">
<div id="content"> <div id="content">
<h1>CakePHP(tm) Test Suite v 1.2.0.0</h1> <h1>CakePHP Test Suite v 1.2.0.0</h1>
<ul> <ul>
<li><a href='<?php echo $groups;?>'>Core Test Groups</a></li> <li><a href='<?php echo $groups;?>'>Core Test Groups</a></li>
<li><a href='<?php echo $cases;?>'>Core Test Cases</a></li> <li><a href='<?php echo $cases;?>'>Core Test Cases</a></li>
@ -37,4 +36,6 @@
<ul> <ul>
<li><a href='<?php echo $groups;?>&amp;app=true'>App Test Groups</a></li> <li><a href='<?php echo $groups;?>&amp;app=true'>App Test Groups</a></li>
<li><a href='<?php echo $cases;?>&amp;app=true'>App Test Cases</a></li> <li><a href='<?php echo $cases;?>&amp;app=true'>App Test Cases</a></li>
</ul> </ul>

View file

@ -27,16 +27,12 @@
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
*/ */
?> ?>
</div> </div>
<div id="footer"> <div id="footer">
<p>
<a href="https://trac.cakephp.org/wiki/Developement/TestSuite">CakePHP(tm) Test Suite </a> ::
<a href="http://www.cakefoundation.org/"> &copy; 2005-2007, Cake Software Foundation, Inc.</a></p>
<p>
<!--PLEASE USE ONE OF THE POWERED BY CAKEPHP LOGO--> <!--PLEASE USE ONE OF THE POWERED BY CAKEPHP LOGO-->
<a href="http://www.cakephp.org/" target="_new"> <a href="http://www.cakephp.org/" target="_new">
<img src="<?php echo $baseUrl; ?>/img/cake.power.png" alt="CakePHP(tm) :: Rapid Development Framework" height = "15" width = "80" /></a></p> <img src="<?php echo $baseUrl; ?>/img/cake.power.png" alt="CakePHP(tm) :: Rapid Development Framework" height = "15" width = "80" /></a></p>
</div> </div>
</div> </div>
</body> </body>
</html> </html>

View file

@ -31,7 +31,16 @@
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<meta http-equiv='content-Type' content='text/html; charset=iso-8859-1' /> <meta http-equiv='content-Type' content='text/html; charset=iso-8859-1' />
<title>CakePHP(tm) Test Suite v 1.2.0.0</title> <title>CakePHP Test Suite v 1.2.0.0</title>
<link rel="stylesheet" type="text/css" href="<?php echo $baseUrl; ?>/css/cake.generic.css" /> <link rel="stylesheet" type="text/css" href="<?php echo $baseUrl; ?>/css/cake.generic.css" />
<style>
h3 {font-size: 150%}
a {font-size: 120%}
li {line-height: 140%}
</style>
</head> </head>
<body> <body>
<div id="container">
<div id="header">
<h1>CakePHP: the PHP Rapid Development Framework</h1>
</div>

View file

@ -313,14 +313,14 @@ class HtmlTestManager extends TestManager {
$groupTests =& $manager->_getTestGroupList($directory); $groupTests =& $manager->_getTestGroupList($directory);
if (1 > count($groupTests)) { if (1 > count($groupTests)) {
$noGroupTests = "<p>No test cases set up!</p>"; $noGroupTests = "<h3>No test cases set up!</h3>";
return $noGroupTests; return $noGroupTests;
} }
if (isset($_GET['app'])){ if (isset($_GET['app'])){
$buffer = "<p>Available App Test Groups:</p>\n<ul>"; $buffer = "<h3>Available App Test Groups:</h3>\n<ul>";
} else { } else {
$buffer = "<p>Available Core Test Groups:</p>\n<ul>"; $buffer = "<h3>Available Core Test Groups:</h3>\n<ul>";
} }
$buffer .= "<li><a href='" . $manager->getBaseURL() . "?group=all$userApp'>All tests</a></li>\n"; $buffer .= "<li><a href='" . $manager->getBaseURL() . "?group=all$userApp'>All tests</a></li>\n";
@ -340,13 +340,13 @@ class HtmlTestManager extends TestManager {
$testCases =& $manager->_getTestCaseList($directory); $testCases =& $manager->_getTestCaseList($directory);
if (1 > count($testCases)) { if (1 > count($testCases)) {
$noTestCases = "<p>No test cases set up!</p>"; $noTestCases = "<h3>No test cases set up!</h3>";
return $noTestCases; return $noTestCases;
} }
if (isset($_GET['app'])) { if (isset($_GET['app'])) {
$buffer = "<p>Available App Test Cases:</p>\n<ul>"; $buffer = "<h3>Available App Test Cases:</h3>\n<ul>";
} else { } else {
$buffer = "<p>Available Core Test Cases:</p>\n<ul>"; $buffer = "<h3>Available Core Test Cases:</h3>\n<ul>";
} }
foreach ($testCases as $testCaseFile => $testCase) { foreach ($testCases as $testCaseFile => $testCase) {
$buffer .= "<li><a href='" . $manager->getBaseURL() . "?case=" . urlencode($testCase) . $userApp ."'>" . $testCase . "</a></li>\n"; $buffer .= "<li><a href='" . $manager->getBaseURL() . "?case=" . urlencode($testCase) . $userApp ."'>" . $testCase . "</a></li>\n";