1 | <?php |
||
9 | class CalculatorTest extends AbstractUnitTestCase |
||
10 | { |
||
11 | const DATA_DIRECTORY = "/../../data/"; |
||
12 | |||
13 | protected $calculator; |
||
14 | |||
15 | protected function setUp() |
||
19 | |||
20 | public function getDataLocalDate() |
||
39 | |||
40 | public function getDataCorrectTimestamp() |
||
57 | |||
58 | public function getDataTimeZoneName() |
||
73 | |||
74 | public function getDataWrongLatitude() |
||
87 | |||
88 | public function getDataWrongLongitude() |
||
102 | |||
103 | public function getDataMaxLatitude() |
||
118 | |||
119 | public function getDataMaxLongitude() |
||
134 | |||
135 | /** |
||
136 | * @dataProvider getDataWrongLatitude |
||
137 | * @param $latitude |
||
138 | * @param $longitude |
||
139 | */ |
||
140 | public function testGetTimeZoneNameWithWrongLatitude($latitude, $longitude) |
||
150 | |||
151 | /** |
||
152 | * @dataProvider getDataWrongLongitude |
||
153 | * @param $latitude |
||
154 | * @param $longitude |
||
155 | */ |
||
156 | public function testGetTimeZoneNameWithWrongLongitude($latitude, $longitude) |
||
166 | |||
167 | /** |
||
168 | * @dataProvider getDataMaxLatitude |
||
169 | * @param $latitude |
||
170 | * @param $longitude |
||
171 | */ |
||
172 | public function testGetTimeZoneNameWithMaxLatitude($latitude, $longitude) |
||
177 | |||
178 | /** |
||
179 | * @dataProvider getDataMaxLongitude |
||
180 | * @param $latitude |
||
181 | * @param $longitude |
||
182 | */ |
||
183 | public function testGetTimeZoneNameWithMaxLongitude($latitude, $longitude) |
||
188 | |||
189 | /** |
||
190 | * @dataProvider getDataMaxLatitude |
||
191 | * @param $latitude |
||
192 | * @param $longitude |
||
193 | * @param $adjustedLatitude |
||
194 | */ |
||
195 | public function testAdjustLatitudeWithMaxLatitude($latitude, $longitude, $adjustedLatitude) |
||
201 | |||
202 | /** |
||
203 | * @dataProvider getDataMaxLongitude |
||
204 | * @param $latitude |
||
205 | * @param $longitude |
||
206 | * @param $adjustedLongitude |
||
207 | */ |
||
208 | public function testAdjustMaxLongitudeWithMaxLongitude($latitude, $longitude, $adjustedLongitude) |
||
214 | |||
215 | /** |
||
216 | * @dataProvider getDataLocalDate |
||
217 | * @param $latitude |
||
218 | * @param $longitude |
||
219 | * @param $timestamp |
||
220 | * @param $expectedTimeZone |
||
221 | * @param $expectedOffset |
||
222 | */ |
||
223 | public function testGetLocalDate($latitude, $longitude, $timestamp, $expectedTimeZone, $expectedOffset) |
||
237 | |||
238 | /** |
||
239 | * @dataProvider getDataCorrectTimestamp |
||
240 | * @param $latitude |
||
241 | * @param $longitude |
||
242 | * @param $timestamp |
||
243 | * @param $expectedTimestamp |
||
244 | */ |
||
245 | public function testGetCorrectTimestamp($latitude, $longitude, $timestamp, $expectedTimestamp) |
||
250 | |||
251 | /** |
||
252 | * @dataProvider getDataTimeZoneName |
||
253 | * @param $latitude |
||
254 | * @param $longitude |
||
255 | * @param $expectedTimeZone |
||
256 | */ |
||
257 | public function testGetTimeZoneName($latitude, $longitude, $expectedTimeZone) |
||
262 | } |
||
263 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.