Skip to content

Commit

Permalink
fix!: use ping as method
Browse files Browse the repository at this point in the history
  • Loading branch information
brokeyourbike committed Aug 28, 2023
1 parent f5b353c commit 7ec6f6a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function getConfig(): ConfigInterface
return $this->config;
}

public function canFetchAccount(): bool
public function ping(): bool
{
$response = $this->performRequest(HttpMethodEnum::OPTIONS, 'GetProvidusAccount', []);
if ($response->getStatusCode() === 200) {
Expand Down
4 changes: 2 additions & 2 deletions tests/FetchAccountTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function it_can_prepare_request(): void
}

/** @test */
public function it_can_fetch_account(): void
public function it_can_ping(): void
{
$mockedConfig = $this->getMockBuilder(ConfigInterface::class)->getMock();
$mockedConfig->method('getUrl')->willReturn('https://api.example/');
Expand All @@ -96,7 +96,7 @@ public function it_can_fetch_account(): void
* */
$api = new Client($mockedConfig, $mockedClient);

$requestResult = $api->canFetchAccount();
$requestResult = $api->ping();
$this->assertTrue($requestResult);
}
}

0 comments on commit 7ec6f6a

Please sign in to comment.