Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
OskarStark committed Sep 17, 2024
1 parent c58f027 commit 56da5f2
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tests/Client/Response/GlancesResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,12 @@ final class GlancesResponseTest extends TestCase
{
public function testCanBeConstructed(): void
{
$successfulCurlResponse = '{"status":1,"request":"aaaaaaaa-1111-bbbb-2222-cccccccccccc"}';
$response = new GlancesResponse($successfulCurlResponse);

$response = new GlancesResponse('{"status":1,"request":"aaaaaaaa-1111-bbbb-2222-cccccccccccc"}');
$this->assertInstanceOf(GlancesResponse::class, $response);
$this->assertTrue($response->isSuccessful());
$this->assertSame('aaaaaaaa-1111-bbbb-2222-cccccccccccc', $response->getRequestToken());

$unsuccessfulCurlResponse = '{"token":"invalid","errors":["application token is invalid"],"status":0,"request":"aaaaaaaa-1111-bbbb-2222-cccccccccccc"}';
$response = new GlancesResponse($unsuccessfulCurlResponse);

$response = new GlancesResponse('{"token":"invalid","errors":["application token is invalid"],"status":0,"request":"aaaaaaaa-1111-bbbb-2222-cccccccccccc"}');
$this->assertInstanceOf(GlancesResponse::class, $response);
$this->assertFalse($response->isSuccessful());
$this->assertSame('aaaaaaaa-1111-bbbb-2222-cccccccccccc', $response->getRequestToken());
Expand Down

0 comments on commit 56da5f2

Please sign in to comment.