assertStringStartsWith('Continent:
', $generated[0]);
// Javascript handler
$this->assertStringStartsWith('', $generated[1]);
}
/**
* Generate a timezone selection form, with a preselected timezone
*/
public function testGenerateTimeZoneFormPreselected()
{
$generated = generateTimeZoneForm('Antarctica/Syowa');
// HTML form
$this->assertStringStartsWith('Continent:
', $generated[0]);
// Javascript handler
$this->assertStringStartsWith('', $generated[1]);
}
/**
* Check valid timezones
*/
public function testValidTimeZone()
{
$this->assertTrue(isTimeZoneValid('America', 'Argentina/Ushuaia'));
$this->assertTrue(isTimeZoneValid('Europe', 'Oslo'));
$this->assertTrue(isTimeZoneValid('UTC', 'UTC'));
}
/**
* Check invalid timezones
*/
public function testInvalidTimeZone()
{
$this->assertFalse(isTimeZoneValid('CEST', 'CEST'));
$this->assertFalse(isTimeZoneValid('Europe', 'Atlantis'));
$this->assertFalse(isTimeZoneValid('Middle_Earth', 'Moria'));
}
}
?>