/** * @test * @dataProvider stdWrap_strftimeReturnsFormattedStringDataProvider */ public function stdWrap_strftimeReturnsFormattedString($content, $conf) { // Set exec_time to a hard timestamp (backed up by $this->backupGlobals = TRUE) $GLOBALS['EXEC_TIME'] = 1346500800; // Save current timezone and set to UTC to make the system unter test behave // the same in all server timezone settings $timezoneBackup = date_default_timezone_get(); date_default_timezone_set('UTC'); $result = $this->cObj->stdWrap_strftime($content, $conf); // Reset timezone date_default_timezone_set($timezoneBackup); $this->assertEquals('01-09-2012', $result); }