Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Commit

Permalink
Use stricter assertions. (#878)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmichot committed Jul 9, 2021
1 parent 3fafd15 commit fc6c528
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/Macros/TokenRedirectTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function testTokenRedirect(): void
$response = Redirector::tokenRedirect('home');
$location = $response->headers->get('location');

$this->assertEquals(
$this->assertSame(
'http://localhost/authenticate/token?shop=example.myshopify.com&target=http%3A%2F%2Flocalhost',
$location
);
Expand Down
2 changes: 1 addition & 1 deletion tests/Macros/TokenRouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function testTokenRoute(): void
// Run the macro and get the link
$result = UrlGenerator::tokenRoute('home');

$this->assertEquals(
$this->assertSame(
'http://localhost/authenticate/token?shop=example.myshopify.com&target=http%3A%2F%2Flocalhost',
$result
);
Expand Down
2 changes: 1 addition & 1 deletion tests/Objects/Transfers/ChargeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function testSetThrowsAnError(): void

public function testToArray(): void
{
$this->assertEquals([
$this->assertSame([
'shopId' => null,
'planId' => null,
'chargeReference' => null,
Expand Down
4 changes: 2 additions & 2 deletions tests/Objects/Values/SessionTokenTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ public function testShouldProcessForValidToken(): void
$this->assertTrue(Str::contains($this->tokenDefaults['dest'], $st->getShopDomain()->toNative()));

$this->assertInstanceOf(SessionIdValue::class, $st->getSessionId());
$this->assertEquals($this->tokenDefaults['sid'], $st->getSessionId()->toNative());
$this->assertSame($this->tokenDefaults['sid'], $st->getSessionId()->toNative());

$this->assertInstanceOf(Carbon::class, $st->getExpiration());
$this->assertEquals($this->tokenDefaults['exp'], $st->getExpiration()->unix());
$this->assertSame($this->tokenDefaults['exp'], $st->getExpiration()->unix());
}

public function testShouldThrowExceptionForMalformedToken(): void
Expand Down
4 changes: 2 additions & 2 deletions tests/UtilTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ public function testGetShopifyConfig(): void
$secret = Util::getShopifyConfig('api_secret');
$grantMode = Util::getShopifyConfig('api_grant_mode');

$this->assertEquals('hello world', $secret);
$this->assertEquals('OFFLINE', $grantMode);
$this->assertSame('hello world', $secret);
$this->assertSame('OFFLINE', $grantMode);
}

public function testGraphQLWebhookTopic(): void
Expand Down

0 comments on commit fc6c528

Please sign in to comment.