- $generated = generateTimeZoneForm('Antarctica/Syowa');
-
- // HTML form
- $this->assertStringStartsWith('Continent:<select', $generated[0]);
- $this->assertContains(
- 'value="Antarctica" selected="selected"',
- $generated[0]
- );
- $this->assertContains(
- 'value="Syowa" selected="selected"',
- $generated[0]
- );
- $this->assertStringEndsWith('</select><br />', $generated[0]);
+ $expected = [
+ 'continents' => [
+ 'Antarctica',
+ 'Europe',
+ 'UTC',
+ 'selected' => 'Antarctica',
+ ],
+ 'cities' => [
+ ['continent' => 'Antarctica', 'city' => 'Syowa'],
+ ['continent' => 'Europe', 'city' => 'London'],
+ ['continent' => 'Europe', 'city' => 'Paris'],
+ ['continent' => 'UTC', 'city' => 'UTC'],
+ 'selected' => 'Syowa',
+ ]
+ ];