1 | <?php |
||
17 | class DisplayMapTest extends TestCase { |
||
18 | |||
19 | private $originalHeight; |
||
20 | private $originalWidth; |
||
21 | |||
22 | public function setUp(): void { |
||
26 | |||
27 | public function tearDown(): void { |
||
31 | |||
32 | public function testMapIdIsSet() { |
||
38 | |||
39 | private function parse( string $textToParse ): string { |
||
44 | |||
45 | public function testServiceSelectionWorks() { |
||
51 | |||
52 | public function testSingleCoordinatesAreIncluded() { |
||
58 | |||
59 | public function testMultipleCoordinatesAreIncluded() { |
||
65 | |||
66 | public function testTagIsRendered() { |
||
72 | |||
73 | public function testTagServiceParameterIsUsed() { |
||
79 | |||
80 | public function testWhenThereAreNoLocations_locationsArrayIsEmpty() { |
||
86 | |||
87 | public function testLocationTitleGetsIncluded() { |
||
93 | |||
94 | public function testLocationDescriptionGetsIncluded() { |
||
100 | |||
101 | public function testRectangleDisplay() { |
||
107 | |||
108 | public function testCircleDisplay() { |
||
114 | |||
115 | public function testRectangleFillOpacityIsUsed() { |
||
121 | |||
122 | public function testRectangleFillColorIsUsed() { |
||
128 | |||
129 | public function testServiceSelectionWorksWhenItIsPrecededByMultipleParameters() { |
||
137 | |||
138 | public function testDimensionDefaultsAsInteger() { |
||
152 | |||
153 | // TODO: need DI to test |
||
154 | // public function testWhenLocationHasVisitedIconModifier_itIsUsed() { |
||
155 | // $this->assertContains( |
||
156 | // '"visitedicon":"VisitedIcon.png"', |
||
157 | // $this->parse( '{{#display_map:1,1~title~text~icon~group~inline label~VisitedIcon.png}}' ) |
||
158 | // ); |
||
159 | // } |
||
160 | // |
||
161 | // public function testWhenLocationHasVisitedIconModifierWithNamespacePrefix_thePrefixGetsRemoved() { |
||
162 | // $this->assertContains(MapsMapperTest |
||
163 | // '"visitedicon":"VisitedIcon.png"', |
||
164 | // $this->parse( '{{#display_map:1,1~title~text~icon~group~inline label~File:VisitedIcon.png}}' ) |
||
165 | // ); |
||
166 | // } |
||
167 | // |
||
168 | // public function testWhenVisitedIconParameterIsProvidedWithNamespacePrefix_thePrefixGetsRemoved() { |
||
169 | // $this->assertContains( |
||
170 | // '"visitedicon":"VisitedIcon.png"', |
||
171 | // $this->parse( '{{#display_map:1,1|visitedicon=File:VisitedIcon.png}}' ) |
||
172 | // ); |
||
173 | // } |
||
174 | // |
||
175 | // public function testWhenLocationHasIconModifierWithNamespacePrefix_thePrefixGetsRemoved() { |
||
176 | // $this->assertContains( |
||
177 | // '"icon":"Icon.png"', |
||
178 | // $this->parse( '{{#display_map:1,1~title~text~File:Icon.png}}' ) |
||
179 | // ); |
||
180 | // } |
||
181 | |||
182 | public function testWhenIconParameterIsProvidedButEmpty_itIsDefaulted() { |
||
190 | |||
191 | public function testWhenLocationHasNoTitleAndText_textFieldIsEmptyString() { |
||
197 | |||
198 | public function testGeoJsonSourceForFile() { |
||
208 | |||
209 | private function skipOn131() { |
||
214 | |||
215 | public function testGeoJsonSourceForPage() { |
||
234 | |||
235 | } |
||
236 |