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

Use stricter assertions. #878

Merged
merged 1 commit into from
Jul 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -40,7 +40,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,7 +79,7 @@ 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);
}
}