Skip to content

Commit

Permalink
fixes method name
Browse files Browse the repository at this point in the history
  • Loading branch information
gutocf committed May 25, 2022
1 parent c712270 commit 684e267
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Service/V1/FipeService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down
4 changes: 2 additions & 2 deletions tests/Service/V1/FipeServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ 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([
new Response(200, [], strval(json_encode($data))),
]);
$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']);
}
Expand Down

0 comments on commit 684e267

Please sign in to comment.