Skip to content

Commit

Permalink
Fixing skip in previous commit: if skip condition evaluates to true, …
Browse files Browse the repository at this point in the history
…to prevent a fatal error from being produced.
  • Loading branch information
jperras committed Oct 19, 2009
1 parent daafac8 commit ae342c6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cake/tests/cases/libs/view/helpers/time.test.php
Expand Up @@ -639,7 +639,10 @@ function testWasWithinLast() {
* @return void
*/
function testUserOffset() {
$this->skipIf(!class_exists('DateTimeZone'), '%s DateTimeZone class not available.');
if ($this->skipIf(!class_exists('DateTimeZone'), '%s DateTimeZone class not available.')) {
return;
}


$timezoneServer = new DateTimeZone(date_default_timezone_get());
$timeServer = new DateTime('now', $timezoneServer);
Expand Down

0 comments on commit ae342c6

Please sign in to comment.