From 684e26752f5be490a9da03247231c474693786f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Augusto=20C=C3=A9sar=20Ferreira?= Date: Tue, 24 May 2022 22:44:43 -0300 Subject: [PATCH] fixes method name --- src/Service/V1/FipeService.php | 2 +- tests/Service/V1/FipeServiceTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Service/V1/FipeService.php b/src/Service/V1/FipeService.php index 0d44c51..58f5599 100644 --- a/src/Service/V1/FipeService.php +++ b/src/Service/V1/FipeService.php @@ -39,7 +39,7 @@ public function getAllVehicleByCode(string $code, int $referenceTableId = null): * @throws \Gutocf\BrasilAPI\Exception\InternalServerErrorException * @return \Gutocf\BrasilAPI\Entity\V1\Fipe\ReferenceTable[] */ - public function getReferenceTables(): array + public function getAllReferenceTables(): array { $data = $this->adapter->get('/api/fipe/tabelas/v1'); diff --git a/tests/Service/V1/FipeServiceTest.php b/tests/Service/V1/FipeServiceTest.php index 6b8e55b..4ea801b 100644 --- a/tests/Service/V1/FipeServiceTest.php +++ b/tests/Service/V1/FipeServiceTest.php @@ -34,7 +34,7 @@ public function testGetAllVehicleByCode(): void $this->assertEquals($vehicles[0]->modelo, $data[0]['modelo']); } - public function testGetReferenceTables(): void + public function testgetAllReferenceTables(): void { $data = loadFixture('Entity/V1/Fipe/reference-tables'); $mock = new MockHandler([ @@ -42,7 +42,7 @@ public function testGetReferenceTables(): void ]); $handlerStack = HandlerStack::create($mock); $fipeService = new FipeService(new Adapter(new Client(['handler' => $handlerStack]))); - $referenceTables = $fipeService->getReferenceTables(); + $referenceTables = $fipeService->getAllReferenceTables(); $this->assertInstanceOf(ReferenceTable::class, $referenceTables[0]); $this->assertEquals($referenceTables[0]->codigo, $data[0]['codigo']); }