From 58eb7b80abca3a9600135828568ac7dbb60cd6ce Mon Sep 17 00:00:00 2001 From: Esteban Date: Tue, 23 Dec 2014 17:29:08 -0300 Subject: [PATCH] Added All options enabled when running test from webfrontend Fix failing test Fix CS problem with new code Fix test for code coverage generator Fix tests Fix CS Errors Removed spaces in tabulation --- lib/Cake/Test/Case/TestSuite/HtmlCoverageReportTest.php | 4 ++-- lib/Cake/TestSuite/Coverage/HtmlCoverageReport.php | 2 +- lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Cake/Test/Case/TestSuite/HtmlCoverageReportTest.php b/lib/Cake/Test/Case/TestSuite/HtmlCoverageReportTest.php index 9f8d37e11..6763d2f1f 100644 --- a/lib/Cake/Test/Case/TestSuite/HtmlCoverageReportTest.php +++ b/lib/Cake/Test/Case/TestSuite/HtmlCoverageReportTest.php @@ -119,7 +119,7 @@ class HtmlCoverageReportTest extends CakeTestCase { ); $result = $this->Coverage->generateDiff('myfile.php', $file, $coverage); $this->assertRegExp('/myfile\.php Code coverage\: \d+\.?\d*\%/', $result); - $this->assertRegExp('/
assertRegExp('/
assertRegExp('/
/', $result);
 		foreach ($file as $i => $line) {
 			$this->assertTrue(strpos($line, $result) !== 0, 'Content is missing ' . $i);
@@ -167,7 +167,7 @@ class HtmlCoverageReportTest extends CakeTestCase {
 
 		$result = $this->Coverage->generateDiff('myfile.php', $file, $coverage);
 		$this->assertRegExp('/myfile\.php Code coverage\: \d+\.?\d*\%/', $result);
-		$this->assertRegExp('/
assertRegExp('/
assertRegExp('/
/', $result);
 		foreach ($file as $i => $line) {
 			$this->assertTrue(strpos($line, $result) !== 0, 'Content is missing ' . $i);
diff --git a/lib/Cake/TestSuite/Coverage/HtmlCoverageReport.php b/lib/Cake/TestSuite/Coverage/HtmlCoverageReport.php
index 8744e5254..0d194f795 100644
--- a/lib/Cake/TestSuite/Coverage/HtmlCoverageReport.php
+++ b/lib/Cake/TestSuite/Coverage/HtmlCoverageReport.php
@@ -200,8 +200,8 @@ HTML;
  * @return string
  */
 	public function coverageHeader($filename, $percent) {
+		$hash = md5($filename);
 		$filename = basename($filename);
-        $hash = md5( $filename.$percent);
 		list($file) = explode('.', $filename);
 		$display = in_array($file, $this->_testNames) ? 'block' : 'none';
 		$primary = $display === 'block' ? 'primary' : '';
diff --git a/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php b/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php
index d67373682..f24444d34 100644
--- a/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php
+++ b/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php
@@ -205,6 +205,7 @@ class CakeHtmlReporter extends CakeBaseReporter {
 		echo "

Run more tests | Show Passes | \n"; echo "Enable Debug Output | \n"; echo "Analyze Code Coverage

\n"; + echo "All options enabled

\n"; } /**