1 | <?php |
||
15 | class DisplayMapTest extends TestCase { |
||
16 | |||
17 | private $originalHeight; |
||
18 | private $originalWidth; |
||
19 | |||
20 | public function setUp(): void { |
||
24 | |||
25 | public function tearDown(): void { |
||
29 | |||
30 | public function testMapIdIsSet() { |
||
36 | |||
37 | private function parse( string $textToParse ): string { |
||
42 | |||
43 | public function testServiceSelectionWorks() { |
||
49 | |||
50 | public function testSingleCoordinatesAreIncluded() { |
||
56 | |||
57 | public function testMultipleCoordinatesAreIncluded() { |
||
63 | |||
64 | public function testTagIsRendered() { |
||
70 | |||
71 | public function testTagServiceParameterIsUsed() { |
||
77 | |||
78 | public function testWhenThereAreNoLocations_locationsArrayIsEmpty() { |
||
84 | |||
85 | public function testLocationTitleGetsIncluded() { |
||
91 | |||
92 | public function testLocationDescriptionGetsIncluded() { |
||
98 | |||
99 | public function testRectangleDisplay() { |
||
105 | |||
106 | public function testCircleDisplay() { |
||
112 | |||
113 | public function testRectangleFillOpacityIsUsed() { |
||
119 | |||
120 | public function testRectangleFillColorIsUsed() { |
||
126 | |||
127 | public function testServiceSelectionWorksWhenItIsPrecededByMultipleParameters() { |
||
135 | |||
136 | public function testDimensionDefaultsAsInteger() { |
||
150 | |||
151 | // TODO: need DI to test |
||
152 | // public function testWhenLocationHasVisitedIconModifier_itIsUsed() { |
||
153 | // $this->assertStringContainsString( |
||
154 | // '"visitedicon":"VisitedIcon.png"', |
||
155 | // $this->parse( '{{#display_map:1,1~title~text~icon~group~inline label~VisitedIcon.png}}' ) |
||
156 | // ); |
||
157 | // } |
||
158 | // |
||
159 | // public function testWhenLocationHasVisitedIconModifierWithNamespacePrefix_thePrefixGetsRemoved() { |
||
160 | // $this->assertStringContainsString(MapsMapperTest |
||
161 | // '"visitedicon":"VisitedIcon.png"', |
||
162 | // $this->parse( '{{#display_map:1,1~title~text~icon~group~inline label~File:VisitedIcon.png}}' ) |
||
163 | // ); |
||
164 | // } |
||
165 | // |
||
166 | // public function testWhenVisitedIconParameterIsProvidedWithNamespacePrefix_thePrefixGetsRemoved() { |
||
167 | // $this->assertStringContainsString( |
||
168 | // '"visitedicon":"VisitedIcon.png"', |
||
169 | // $this->parse( '{{#display_map:1,1|visitedicon=File:VisitedIcon.png}}' ) |
||
170 | // ); |
||
171 | // } |
||
172 | // |
||
173 | // public function testWhenLocationHasIconModifierWithNamespacePrefix_thePrefixGetsRemoved() { |
||
174 | // $this->assertStringContainsString( |
||
175 | // '"icon":"Icon.png"', |
||
176 | // $this->parse( '{{#display_map:1,1~title~text~File:Icon.png}}' ) |
||
177 | // ); |
||
178 | // } |
||
179 | |||
180 | public function testWhenIconParameterIsProvidedButEmpty_itIsDefaulted() { |
||
188 | |||
189 | public function testWhenLocationHasNoTitleAndText_textFieldIsEmptyString() { |
||
195 | |||
196 | public function testGeoJsonSourceForFile() { |
||
204 | |||
205 | public function testGeoJsonSourceForPage() { |
||
222 | |||
223 | } |
||
224 |