@@ -6,9 +6,9 @@ |
||
| 6 | 6 | |
| 7 | 7 | use Marek\OpenWeatherMap\Core\WeatherServices; |
| 8 | 8 | |
| 9 | -describe(WeatherServices::class, function () { |
|
| 10 | - describe('->getWeatherService', function () { |
|
| 11 | - it('it is ok', function () { |
|
| 9 | +describe(WeatherServices::class, function() { |
|
| 10 | + describe('->getWeatherService', function() { |
|
| 11 | + it('it is ok', function() { |
|
| 12 | 12 | expect(1)->toBe(1); |
| 13 | 13 | }); |
| 14 | 14 | }); |
@@ -6,40 +6,40 @@ |
||
| 6 | 6 | |
| 7 | 7 | use Marek\OpenWeatherMap\Http\Response\JsonResponse; |
| 8 | 8 | |
| 9 | -describe(JsonResponse::class, function () { |
|
| 9 | +describe(JsonResponse::class, function() { |
|
| 10 | 10 | |
| 11 | 11 | beforeEach(function() { |
| 12 | 12 | $this->data = '{"coord":{"lon":-0.13,"lat":51.51},"weather":[{"id":300,"main":"Drizzle","description":"light intensity drizzle","icon":"09d"}],"base":"stations","main":{"temp":280.32,"pressure":1012,"humidity":81,"temp_min":279.15,"temp_max":281.15},"visibility":10000,"wind":{"speed":4.1,"deg":80},"clouds":{"all":90},"dt":1485789600,"sys":{"type":1,"id":5091,"message":0.0103,"country":"GB","sunrise":1485762037,"sunset":1485794875},"id":2643743,"name":"London","cod":200}'; |
| 13 | 13 | $this->decoded = json_decode($this->data, true, 512, JSON_THROW_ON_ERROR); |
| 14 | - $this->response = new JsonResponse($this->data , 300); |
|
| 14 | + $this->response = new JsonResponse($this->data, 300); |
|
| 15 | 15 | }); |
| 16 | 16 | |
| 17 | - describe('->getStatusCode()', function () { |
|
| 18 | - it('expects that it will return proper http status code', function () { |
|
| 17 | + describe('->getStatusCode()', function() { |
|
| 18 | + it('expects that it will return proper http status code', function() { |
|
| 19 | 19 | expect($this->response->getStatusCode())->toBe(200); |
| 20 | 20 | }); |
| 21 | 21 | }); |
| 22 | 22 | |
| 23 | - describe('->getData()', function () { |
|
| 24 | - it('expects that', function () { |
|
| 23 | + describe('->getData()', function() { |
|
| 24 | + it('expects that', function() { |
|
| 25 | 25 | expect($this->response->getData())->toBe($this->decoded); |
| 26 | 26 | }); |
| 27 | 27 | }); |
| 28 | 28 | |
| 29 | - describe('->isOk()', function () { |
|
| 30 | - it('expects that', function () { |
|
| 29 | + describe('->isOk()', function() { |
|
| 30 | + it('expects that', function() { |
|
| 31 | 31 | expect($this->response->isOk())->toBe(true); |
| 32 | 32 | }); |
| 33 | 33 | }); |
| 34 | 34 | |
| 35 | - describe('->isAuthorized()', function () { |
|
| 36 | - it('expects that', function () { |
|
| 35 | + describe('->isAuthorized()', function() { |
|
| 36 | + it('expects that', function() { |
|
| 37 | 37 | expect($this->response->isAuthorized())->toBe(true); |
| 38 | 38 | }); |
| 39 | 39 | }); |
| 40 | 40 | |
| 41 | - describe('->getMessage()', function () { |
|
| 42 | - it('expects that', function () { |
|
| 41 | + describe('->getMessage()', function() { |
|
| 42 | + it('expects that', function() { |
|
| 43 | 43 | expect($this->response->getMessage())->toBe(''); |
| 44 | 44 | }); |
| 45 | 45 | }); |
@@ -6,40 +6,40 @@ |
||
| 6 | 6 | |
| 7 | 7 | use Marek\OpenWeatherMap\Http\Client\SymfonyHttpClient; |
| 8 | 8 | |
| 9 | -describe(SymfonyHttpClient::class, function () { |
|
| 9 | +describe(SymfonyHttpClient::class, function() { |
|
| 10 | 10 | |
| 11 | 11 | beforeEach(function() { |
| 12 | 12 | $this->data = '{"coord":{"lon":-0.13,"lat":51.51},"weather":[{"id":300,"main":"Drizzle","description":"light intensity drizzle","icon":"09d"}],"base":"stations","main":{"temp":280.32,"pressure":1012,"humidity":81,"temp_min":279.15,"temp_max":281.15},"visibility":10000,"wind":{"speed":4.1,"deg":80},"clouds":{"all":90},"dt":1485789600,"sys":{"type":1,"id":5091,"message":0.0103,"country":"GB","sunrise":1485762037,"sunset":1485794875},"id":2643743,"name":"London","cod":200}'; |
| 13 | 13 | $this->decoded = json_decode($this->data, true, 512, JSON_THROW_ON_ERROR); |
| 14 | - $this->response = new JsonResponse($this->data , 300); |
|
| 14 | + $this->response = new JsonResponse($this->data, 300); |
|
| 15 | 15 | }); |
| 16 | 16 | |
| 17 | - describe('->getStatusCode()', function () { |
|
| 18 | - it('expects that it will return proper http status code', function () { |
|
| 17 | + describe('->getStatusCode()', function() { |
|
| 18 | + it('expects that it will return proper http status code', function() { |
|
| 19 | 19 | expect($this->response->getStatusCode())->toBe(200); |
| 20 | 20 | }); |
| 21 | 21 | }); |
| 22 | 22 | |
| 23 | - describe('->getData()', function () { |
|
| 24 | - it('expects that', function () { |
|
| 23 | + describe('->getData()', function() { |
|
| 24 | + it('expects that', function() { |
|
| 25 | 25 | expect($this->response->getData())->toBe($this->decoded); |
| 26 | 26 | }); |
| 27 | 27 | }); |
| 28 | 28 | |
| 29 | - describe('->isOk()', function () { |
|
| 30 | - it('expects that', function () { |
|
| 29 | + describe('->isOk()', function() { |
|
| 30 | + it('expects that', function() { |
|
| 31 | 31 | expect($this->response->isOk())->toBe(true); |
| 32 | 32 | }); |
| 33 | 33 | }); |
| 34 | 34 | |
| 35 | - describe('->isAuthorized()', function () { |
|
| 36 | - it('expects that', function () { |
|
| 35 | + describe('->isAuthorized()', function() { |
|
| 36 | + it('expects that', function() { |
|
| 37 | 37 | expect($this->response->isAuthorized())->toBe(true); |
| 38 | 38 | }); |
| 39 | 39 | }); |
| 40 | 40 | |
| 41 | - describe('->getMessage()', function () { |
|
| 42 | - it('expects that', function () { |
|
| 41 | + describe('->getMessage()', function() { |
|
| 42 | + it('expects that', function() { |
|
| 43 | 43 | expect($this->response->getMessage())->toBe(''); |
| 44 | 44 | }); |
| 45 | 45 | }); |