Completed
Branch PSR2 (9f3042)
by Gordon
10:27 queued 07:55
created
tests/MapAPITest.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -304,9 +304,9 @@  discard block
 block discarded – undo
304 304
         $map = $this->getMapMultipleItems();
305 305
         $html = $map->forTemplate();
306 306
         $expected = 'data-mapmarkers=\'[{"latitude":23,"longitude":78,"html":"'
307
-                  .'MEMBER: Fred Bloggs","category":"default","icon":false},{"latitude'
308
-                  .'":-12,"longitude":42.1,"html":"MEMBER: Kane Williamson","category"'
309
-                  .':"default","icon":false}]\'';
307
+                    .'MEMBER: Fred Bloggs","category":"default","icon":false},{"latitude'
308
+                    .'":-12,"longitude":42.1,"html":"MEMBER: Kane Williamson","category"'
309
+                    .':"default","icon":false}]\'';
310 310
         $this->assertContains($expected, $html);
311 311
     }
312 312
 
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
     {
339 339
         $map = $this->getMap();
340 340
         $filepath = 'file://'.Director::baseFolder()
341
-                  .'/mappable/tests/kml/example.kml';
341
+                    .'/mappable/tests/kml/example.kml';
342 342
         $content = $map->getContent($filepath);
343 343
         $textHash = hash('ripemd160', $content);
344 344
         $fileHash = hash_file('ripemd160', $filepath);
Please login to merge, or discard this patch.
tests/MapFieldTest.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@  discard block
 block discarded – undo
7 7
         //$headingLevel = 2, $allowHTML = false, $form = nul
8 8
         $field = new MapField('NameOfField', 'TitleOfField');
9 9
         $expected = '<div class="editableMap"><div class="middleColumn" id="Nam'
10
-                  .'eOfField" style="width:100%;height:300px;margin:5px 0px 5p'
11
-                  .'x 5px;position:relative;"></div></div>';
10
+                    .'eOfField" style="width:100%;height:300px;margin:5px 0px 5p'
11
+                    .'x 5px;position:relative;"></div></div>';
12 12
         $this->assertEquals($expected, $field->Field());
13 13
     }
14 14
 
@@ -17,8 +17,8 @@  discard block
 block discarded – undo
17 17
         //$headingLevel = 2, $allowHTML = false, $form = nul
18 18
         $field = new MapField('NameOfField');
19 19
         $expected = '<div class="editableMap"><div class="middleColumn" id="Nam'
20
-                  .'eOfField" style="width:100%;height:300px;margin:5px 0px 5p'
21
-                  .'x 5px;position:relative;"></div></div>';
20
+                    .'eOfField" style="width:100%;height:300px;margin:5px 0px 5p'
21
+                    .'x 5px;position:relative;"></div></div>';
22 22
         $this->assertEquals($expected, $field->Field());
23 23
     }
24 24
 }
Please login to merge, or discard this patch.
tests/MappableDataTest.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -99,9 +99,9 @@  discard block
 block discarded – undo
99 99
         $instance->Lon = 100.52;
100 100
         $html = $instance->StaticMap(300, 800);
101 101
         $expected = '<img src="//maps.googleapis.com/maps/api/staticmap?center='
102
-                  .'13.84%2C100.52&amp;markers=13.84%2C100.52'
103
-                  .'&amp;zoom=13&amp;size=300x800&amp;sensor=false&amp;mapt'
104
-                  .'ype=roadmap" width="300" height="800" alt="User" />';
102
+                    .'13.84%2C100.52&amp;markers=13.84%2C100.52'
103
+                    .'&amp;zoom=13&amp;size=300x800&amp;sensor=false&amp;mapt'
104
+                    .'ype=roadmap" width="300" height="800" alt="User" />';
105 105
         $this->assertEquals($expected, $html);
106 106
     }
107 107
 
@@ -112,16 +112,16 @@  discard block
 block discarded – undo
112 112
         $instance->Lon = 100.5005558;
113 113
         $html = $instance->StaticMap(300, 800);
114 114
         $expected = '<img src="//maps.googleapis.com/maps/api/staticmap?center='
115
-                  .'13.8188931%2C100.5005558&amp;markers=13.8188931%2C100.5005'
116
-                  .'558&amp;zoom=13&amp;size=300x800&amp;sensor=false&amp;mapt'
117
-                  .'ype=roadmap" width="300" height="800" alt="User" />';
115
+                    .'13.8188931%2C100.5005558&amp;markers=13.8188931%2C100.5005'
116
+                    .'558&amp;zoom=13&amp;size=300x800&amp;sensor=false&amp;mapt'
117
+                    .'ype=roadmap" width="300" height="800" alt="User" />';
118 118
         $this->assertEquals($expected, $html);
119 119
 
120 120
         $html = $instance->StaticMap(310, 810);
121 121
         $expected = '<img src="//maps.googleapis.com/maps/api/staticmap?center='
122
-                  .'13.8188931%2C100.5005558&amp;markers=13.8188931%2C100.5005'
123
-                  .'558&amp;zoom=13&amp;size=310x810&amp;sensor=false&amp;mapt'
124
-                  .'ype=roadmap" width="310" height="810" alt="User" />';
122
+                    .'13.8188931%2C100.5005558&amp;markers=13.8188931%2C100.5005'
123
+                    .'558&amp;zoom=13&amp;size=310x810&amp;sensor=false&amp;mapt'
124
+                    .'ype=roadmap" width="310" height="810" alt="User" />';
125 125
         $this->assertEquals($expected, $html);
126 126
     }
127 127
 
@@ -132,22 +132,22 @@  discard block
 block discarded – undo
132 132
         $instance->Lon = 100.5005558;
133 133
         $html = $instance->StaticMap(300, 800, null, 'satellite');
134 134
         $expected = '<img src="//maps.googleapis.com/maps/api/staticmap?center='
135
-                  .'13.8188931%2C100.5005558&amp;markers=13.8188931%2C100.5005'
136
-                  .'558&amp;zoom=13&amp;size=300x800&amp;sensor=false&amp;mapt'
137
-                  .'ype=satellite" width="300" height="800" alt="User" />';
135
+                    .'13.8188931%2C100.5005558&amp;markers=13.8188931%2C100.5005'
136
+                    .'558&amp;zoom=13&amp;size=300x800&amp;sensor=false&amp;mapt'
137
+                    .'ype=satellite" width="300" height="800" alt="User" />';
138 138
         $this->assertEquals($expected, $html);
139 139
 
140 140
         $html = $instance->StaticMap(300, 800, null, 'terrain');
141 141
         $expected = '<img src="//maps.googleapis.com/maps/api/staticmap?center='
142
-                  .'13.8188931%2C100.5005558&amp;markers=13.8188931%2C100.5005'
143
-                  .'558&amp;zoom=13&amp;size=300x800&amp;sensor=false&amp;mapt'
144
-                  .'ype=terrain" width="300" height="800" alt="User" />';
142
+                    .'13.8188931%2C100.5005558&amp;markers=13.8188931%2C100.5005'
143
+                    .'558&amp;zoom=13&amp;size=300x800&amp;sensor=false&amp;mapt'
144
+                    .'ype=terrain" width="300" height="800" alt="User" />';
145 145
 
146 146
         $html = $instance->StaticMap(300, 800, null, 'hybrid');
147 147
         $expected = '<img src="//maps.googleapis.com/maps/api/staticmap?center='
148
-                  .'13.8188931%2C100.5005558&amp;markers=13.8188931%2C100.5005'
149
-                  .'558&amp;zoom=13&amp;size=300x800&amp;sensor=false&amp;mapt'
150
-                  .'ype=hybrid" width="300" height="800" alt="User" />';
148
+                    .'13.8188931%2C100.5005558&amp;markers=13.8188931%2C100.5005'
149
+                    .'558&amp;zoom=13&amp;size=300x800&amp;sensor=false&amp;mapt'
150
+                    .'ype=hybrid" width="300" height="800" alt="User" />';
151 151
         $this->assertEquals($expected, $html);
152 152
     }
153 153
 
@@ -157,16 +157,16 @@  discard block
 block discarded – undo
157 157
 
158 158
         $html = $instance->StaticMap(300, 800, 2);
159 159
         $expected = '<img src="//maps.googleapis.com/maps/api/staticmap?center='
160
-                  .'13.8188931%2C100.5005558&amp;markers=13.8188931%2C100.5005'
161
-                  .'558&amp;zoom=2&amp;size=300x800&amp;sensor=false&amp;mapt'
162
-                  .'ype=roadmap" width="300" height="800" alt="User" />';
160
+                    .'13.8188931%2C100.5005558&amp;markers=13.8188931%2C100.5005'
161
+                    .'558&amp;zoom=2&amp;size=300x800&amp;sensor=false&amp;mapt'
162
+                    .'ype=roadmap" width="300" height="800" alt="User" />';
163 163
         $this->assertEquals($expected, $html);
164 164
 
165 165
         $html = $instance->StaticMap(300, 800, 12);
166 166
         $expected = '<img src="//maps.googleapis.com/maps/api/staticmap?center='
167
-                  .'13.8188931%2C100.5005558&amp;markers=13.8188931%2C100.5005'
168
-                  .'558&amp;zoom=12&amp;size=300x800&amp;sensor=false&amp;mapt'
169
-                  .'ype=roadmap" width="300" height="800" alt="User" />';
167
+                    .'13.8188931%2C100.5005558&amp;markers=13.8188931%2C100.5005'
168
+                    .'558&amp;zoom=12&amp;size=300x800&amp;sensor=false&amp;mapt'
169
+                    .'ype=roadmap" width="300" height="800" alt="User" />';
170 170
         $this->assertEquals($expected, $html);
171 171
     }
172 172
 
Please login to merge, or discard this patch.