1 | <?php |
||
12 | class DisplayMapTest extends TestCase { |
||
13 | |||
14 | private $originalHeight; |
||
15 | private $originalWidth; |
||
16 | |||
17 | public function setUp(): void { |
||
21 | |||
22 | public function tearDown(): void { |
||
26 | |||
27 | public function testMapIdIsSet() { |
||
33 | |||
34 | private function parse( string $textToParse ): string { |
||
39 | |||
40 | public function testServiceSelectionWorks() { |
||
46 | |||
47 | public function testSingleCoordinatesAreIncluded() { |
||
53 | |||
54 | public function testMultipleCoordinatesAreIncluded() { |
||
60 | |||
61 | public function testWhenValidZoomIsSpecified_itGetsUsed() { |
||
67 | |||
68 | public function testWhenZoomIsNotSpecifiedAndThereIsOnlyOneLocation_itIsDefaulted() { |
||
74 | |||
75 | public function testWhenZoomIsNotSpecifiedAndThereAreMultipleLocations_itIsDefaulted() { |
||
81 | |||
82 | public function testWhenZoomIsInvalid_itIsDefaulted() { |
||
88 | |||
89 | public function testTagIsRendered() { |
||
95 | |||
96 | public function testTagServiceParameterIsUsed() { |
||
102 | |||
103 | public function testWhenThereAreNoLocations_locationsArrayIsEmpty() { |
||
109 | |||
110 | public function testLocationTitleGetsIncluded() { |
||
116 | |||
117 | public function testLocationDescriptionGetsIncluded() { |
||
123 | |||
124 | public function testRectangleDisplay() { |
||
130 | |||
131 | public function testCircleDisplay() { |
||
137 | |||
138 | public function testRectangleFillOpacityIsUsed() { |
||
144 | |||
145 | public function testRectangleFillColorIsUsed() { |
||
151 | |||
152 | public function testServiceSelectionWorksWhenItIsPrecededByMultipleParameters() { |
||
160 | |||
161 | public function testDimensionDefaultsAsInteger() { |
||
175 | |||
176 | // TODO: need DI to test |
||
177 | // public function testWhenLocationHasVisitedIconModifier_itIsUsed() { |
||
178 | // $this->assertContains( |
||
179 | // '"visitedicon":"VisitedIcon.png"', |
||
180 | // $this->parse( '{{#display_map:1,1~title~text~icon~group~inline label~VisitedIcon.png}}' ) |
||
181 | // ); |
||
182 | // } |
||
183 | // |
||
184 | // public function testWhenLocationHasVisitedIconModifierWithNamespacePrefix_thePrefixGetsRemoved() { |
||
185 | // $this->assertContains(MapsMapperTest |
||
186 | // '"visitedicon":"VisitedIcon.png"', |
||
187 | // $this->parse( '{{#display_map:1,1~title~text~icon~group~inline label~File:VisitedIcon.png}}' ) |
||
188 | // ); |
||
189 | // } |
||
190 | // |
||
191 | // public function testWhenVisitedIconParameterIsProvidedWithNamespacePrefix_thePrefixGetsRemoved() { |
||
192 | // $this->assertContains( |
||
193 | // '"visitedicon":"VisitedIcon.png"', |
||
194 | // $this->parse( '{{#display_map:1,1|visitedicon=File:VisitedIcon.png}}' ) |
||
195 | // ); |
||
196 | // } |
||
197 | // |
||
198 | // public function testWhenLocationHasIconModifierWithNamespacePrefix_thePrefixGetsRemoved() { |
||
199 | // $this->assertContains( |
||
200 | // '"icon":"Icon.png"', |
||
201 | // $this->parse( '{{#display_map:1,1~title~text~File:Icon.png}}' ) |
||
202 | // ); |
||
203 | // } |
||
204 | |||
205 | public function testWhenIconParameterIsProvidedButEmpty_itIsDefaulted() { |
||
213 | |||
214 | public function testWhenLocationHasNoTitleAndText_textFieldIsEmptyString() { |
||
220 | |||
221 | public function testGeoJsonSourceForFile() { |
||
231 | |||
232 | private function skipOn131() { |
||
237 | |||
238 | public function testGeoJsonSourceForPage() { |
||
257 | |||
258 | public function testGoogleMapsKmlFiltersInvalidFileNames() { |
||
266 | |||
267 | } |
||
268 |