11<?php
22
3- use DivineOmega \Postcodes \Exceptions \InvalidPostcodeException ;
43use DivineOmega \Postcodes \Objects \PostcodesIo ;
5- use DivineOmega \Postcodes \Utils \Generator ;
6- use DivineOmega \Postcodes \Utils \Tokenizer ;
7- use DivineOmega \Postcodes \Utils \Validator ;
84use PHPUnit \Framework \TestCase ;
95
106final class PostcodesIoTest extends TestCase
@@ -13,23 +9,23 @@ public function validationProvider()
139 {
1410 return [
1511 [
16- 'postcode ' => 'ST163DP ' ,
12+ 'postcode ' => 'ST163DP ' ,
1713 'expectedResponse ' => [
18- 'townCity ' => 'Stafford ' ,
19- 'county ' => 'Staffordshire ' ,
20- 'postcode ' => 'ST16 3DP ' ,
14+ 'townCity ' => 'Stafford ' ,
15+ 'county ' => 'Staffordshire ' ,
16+ 'postcode ' => 'ST16 3DP ' ,
2117 'longitude ' => -2.11556 ,
22- 'latitude ' => 52.822944 ,
18+ 'latitude ' => 52.822944 ,
2319 ],
2420 ],
2521 [
26- 'postcode ' => 'TN30YA ' ,
22+ 'postcode ' => 'TN30YA ' ,
2723 'expectedResponse ' => [
28- 'townCity ' => 'Tunbridge Wells ' ,
29- 'county ' => 'Kent ' ,
30- 'postcode ' => 'TN3 0YA ' ,
24+ 'townCity ' => 'Tunbridge Wells ' ,
25+ 'county ' => 'Kent ' ,
26+ 'postcode ' => 'TN3 0YA ' ,
3127 'longitude ' => 0.226856 ,
32- 'latitude ' => 51.13246 ,
28+ 'latitude ' => 51.13246 ,
3329 ],
3430 ],
3531 ];
@@ -45,9 +41,8 @@ public function testLookup($postcode, $expectedResponse)
4541
4642 $ address = $ addresses [0 ];
4743
48- foreach ($ expectedResponse as $ key => $ value ) {
44+ foreach ($ expectedResponse as $ key => $ value ) {
4945 $ this ->assertEquals ($ value , $ address ->$ key );
5046 }
5147 }
52-
5348}
0 commit comments