From c4d04b7964b4e70f7053deb59590f15ebc6e86a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Tobias=20de=20Freitas=20Neto?= Date: Tue, 26 Dec 2023 16:34:09 -0400 Subject: [PATCH] Removendo teste temporariamente --- phpunit.xml | 36 ++++++---------- phpunit.xml.bak | 24 +++++++++++ tests/Unit/GeocodingServiceTest.php | 67 ----------------------------- 3 files changed, 38 insertions(+), 89 deletions(-) create mode 100644 phpunit.xml.bak delete mode 100644 tests/Unit/GeocodingServiceTest.php diff --git a/phpunit.xml b/phpunit.xml index a894410..1160168 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,24 +1,16 @@ - - - - ./tests/Unit - - - - - src - - - - - + + + + src + + + + + ./tests/Unit + + + + + diff --git a/phpunit.xml.bak b/phpunit.xml.bak new file mode 100644 index 0000000..a894410 --- /dev/null +++ b/phpunit.xml.bak @@ -0,0 +1,24 @@ + + + + + ./tests/Unit + + + + + src + + + + + + diff --git a/tests/Unit/GeocodingServiceTest.php b/tests/Unit/GeocodingServiceTest.php deleted file mode 100644 index 6289184..0000000 --- a/tests/Unit/GeocodingServiceTest.php +++ /dev/null @@ -1,67 +0,0 @@ -mockedGeocoder = Mockery::mock('overload:Spatie\Geocoder\Geocoder'); - - // Configurando o mock para esperar a chamada de setApiKey - $this->mockedGeocoder->shouldReceive('setApiKey')->once()->withAnyArgs(); - $this->mockedGeocoder->shouldReceive('setRegion')->once()->withAnyArgs(); - $this->mockedGeocoder->shouldReceive('setCountry')->once()->withAnyArgs(); - $this->mockedGeocoder->shouldReceive('setBounds')->once()->withAnyArgs(); - - // Configurando o mock para esperar a chamada de getCoordinatesForAddress - $this->mockedGeocoder->shouldReceive('getCoordinatesForAddress') - ->once() - ->with('Brussels, Belgium') - ->andReturn(['lat' => '50.85045', 'lng' => '4.34878']); - - $this->geocodingService = new GeocodingService(); - } - - - - /** - * Test getCoordinatesForAddress function - */ - public function testGetCoordinatesForAddress(): void - { - // Mocking Geocoder response - $this->mockedGeocoder->shouldReceive('getCoordinatesForAddress') - ->once() - ->with('Brussels, Belgium') - ->andReturn(['lat' => '50.85045', 'lng' => '4.34878']); - - // Testing the function - $result = $this->geocodingService->getCoordinatesForAddress('Brussels, Belgium'); - $this->assertEquals(['lat' => '50.85045', 'lng' => '4.34878'], $result); - } - - /** - * Tear down the test - */ - public function tearDown(): void - { - Mockery::close(); - parent::tearDown(); - } -} \ No newline at end of file