Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making assert equals checking strict #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions tests/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ public function testSetsCorrectAuthenticationHeader()
$request->hasHeader('Content-Type')
);

$this->assertEquals(
$this->assertSame(
$request->getHeader('Accept')[0],
'application/json'
);

$this->assertEquals(
$this->assertSame(
$request->getHeader('Content-Type')[0],
'application/json'
);
Expand Down
6 changes: 3 additions & 3 deletions tests/ResourceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function testGetOne()
$this->isJson($response->__toString());

// Can get data
$this->assertEquals(1, $response->id);
$this->assertSame(1, $response->id);
$this->assertFalse($response->notExistingProperty);
$this->assertTrue(isset($response->id));
}
Expand Down Expand Up @@ -154,8 +154,8 @@ public function testHandlingErrors()
$this->assertInstanceOf(ItemResponse::class, $response);

$error =$response->getError();
$this->assertEquals('DataConflictException', $error->exceptionType);
$this->assertSame('DataConflictException', $error->exceptionType);
$this->assertObjectHasAttribute('messages', $error->exception);
$this->assertEquals('Item not Found', $error->exception->messages[0]->messageCode);
$this->assertSame('Item not Found', $error->exception->messages[0]->messageCode);
}
}