GitBucket
4.21.2
Toggle navigation
Snippets
Sign in
Files
Branches
1
Releases
Issues
Pull requests
Labels
Priorities
Milestones
Wiki
Forks
nigel.stanger
/
sqlmarker
Browse code
Fixed background colours of errors and warnings.
master
1 parent
bf2ac60
commit
d0f9605f2ad91ee572b481ab13dc0f2c41357082
Nigel Stanger
authored
on 27 Jul 2013
Patch
Showing
1 changed file
Unit_testing/Reporter/HTMLReporter.php
Ignore Space
Show notes
View
Unit_testing/Reporter/HTMLReporter.php
<?php require_once 'Reporter.php'; class HTMLReporter extends Reporter { public function report( $status, $reportText, $printfArguments ) { if ( $this->getVerbosity() ) { $statusText = '<p class="blackboard'; switch ( $status ) { case Reporter::STATUS_PASS: $statusText .= ' greenbg result"><span style="font-size: large">✔</span> '; break; case Reporter::STATUS_SKIPPED: $statusText .= '" style="padding-left: 2em;"><strong style="font-size: large">#</strong> '; break; case Reporter::STATUS_INCOMPLETE: $statusText .= ' yellow-ou result"><strong style="font-size: large">%</strong> '; break; case Reporter::STATUS_FAILURE: $statusText .= ' red-ou result""><span style="font-size: large">✘</span> '; break; case Reporter::STATUS_ERROR: $statusText .= ' red-ou result"><span style="font-size: large">☠</span> '; break; case Reporter::STATUS_WARNING: $statusText .= ' yellow-ou result"><span style="font-size: large">⚠</span> '; break; case Reporter::STATUS_NOTE: $statusText .= ' grey-light result">'; break; default: case Reporter::STATUS_TEST: $statusText .= ' style="font-weight: bold;">'; break; default: $statusText .= ' yellow-ou result"><strong style="font-size: large">?</strong> '; break; } if ( $this->getVerbosity() > 1 ) $statusText .= "<strong>" . ucfirst( strtolower( $status ) ) . ':</strong> '; parent::report( $statusText, $reportText . "</span></p>\n", $printfArguments ); } } public function hr() { echo "<hr />\n"; } } ?>
<?php require_once 'Reporter.php'; class HTMLReporter extends Reporter { public function report( $status, $reportText, $printfArguments ) { if ( $this->getVerbosity() ) { $statusText = '<p class="blackboard'; switch ( $status ) { case Reporter::STATUS_PASS: $statusText .= ' greenbg result"><span style="font-size: large">✔</span> '; break; case Reporter::STATUS_SKIPPED: $statusText .= '" style="padding-left: 2em;"><strong style="font-size: large">#</strong> '; break; case Reporter::STATUS_INCOMPLETE: $statusText .= ' uniyellbg result"><strong style="font-size: large">%</strong> '; break; case Reporter::STATUS_FAILURE: $statusText .= ' uniredbg result""><span style="font-size: large">✘</span> '; break; case Reporter::STATUS_ERROR: $statusText .= ' uniredbg result"><span style="font-size: large">☠</span> '; break; case Reporter::STATUS_WARNING: $statusText .= ' uniyellbg result"><span style="font-size: large">⚠</span> '; break; case Reporter::STATUS_NOTE: $statusText .= ' grey-light result">'; break; default: case Reporter::STATUS_TEST: $statusText .= ' style="font-weight: bold;">'; break; default: $statusText .= ' uniyellbg result"><strong style="font-size: large">?</strong> '; break; } if ( $this->getVerbosity() > 1 ) $statusText .= "<strong>" . ucfirst( strtolower( $status ) ) . ':</strong> '; parent::report( $statusText, $reportText . "</span></p>\n", $printfArguments ); } } public function hr() { echo "<hr />\n"; } } ?>
Show line notes below