Skip to content

Commit 186c4e6

Browse files
committed
assertSame instead of assertEquals
1 parent dbfb262 commit 186c4e6

File tree

4 files changed

+129
-129
lines changed

4 files changed

+129
-129
lines changed

src/Codeception/Module/WebDriver.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1359,7 +1359,7 @@ public function seeInCurrentUrl($uri)
13591359

13601360
public function seeCurrentUrlEquals($uri)
13611361
{
1362-
$this->assertEquals($uri, $this->_getCurrentUri());
1362+
$this->assertSame($uri, $this->_getCurrentUri());
13631363
}
13641364

13651365
public function seeCurrentUrlMatches($uri)
@@ -2081,7 +2081,7 @@ public function seeNumberOfElements($selector, $expected)
20812081
'Number of elements counted differs from expected range'
20822082
);
20832083
} else {
2084-
$this->assertEquals(
2084+
$this->assertSame(
20852085
$expected,
20862086
$counted,
20872087
'Number of elements counted differs from expected number'
@@ -2104,7 +2104,7 @@ public function seeNumberOfElementsInDOM($selector, $expected)
21042104
'Number of elements counted differs from expected range'
21052105
);
21062106
} else {
2107-
$this->assertEquals(
2107+
$this->assertSame(
21082108
$expected,
21092109
$counted,
21102110
'Number of elements counted differs from expected number'
@@ -3489,7 +3489,7 @@ public function openNewTab(): void
34893489
*/
34903490
public function seeNumberOfTabs($number): void
34913491
{
3492-
$this->assertEquals(count($this->webDriver->getWindowHandles()), $number);
3492+
$this->assertSame(count($this->webDriver->getWindowHandles()), $number);
34933493
}
34943494

34953495
/**

tests/unit/Codeception/Module/TestsForBrowsers.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ public function testAmOnSubdomain()
1818
{
1919
$this->module->_reconfigure(array('url' => 'http://google.com'));
2020
$this->module->amOnSubdomain('user');
21-
$this->assertEquals('http://user.google.com', $this->module->_getUrl());
21+
$this->assertSame('http://user.google.com', $this->module->_getUrl());
2222

2323
$this->module->_reconfigure(array('url' => 'http://www.google.com'));
2424
$this->module->amOnSubdomain('user');
25-
$this->assertEquals('http://user.google.com', $this->module->_getUrl());
25+
$this->assertSame('http://user.google.com', $this->module->_getUrl());
2626
}
2727

2828
public function testOpenAbsoluteUrls()
@@ -33,7 +33,7 @@ public function testOpenAbsoluteUrls()
3333
$this->module->see('Information', 'h1');
3434
$this->module->amOnPage('/form/empty');
3535
$this->module->seeCurrentUrlEquals('/form/empty');
36-
$this->assertEquals('http://127.0.0.1:8000', $this->module->_getUrl(), 'Host has changed');
36+
$this->assertSame('http://127.0.0.1:8000', $this->module->_getUrl(), 'Host has changed');
3737
}
3838

3939
public function testHeadersRedirect()

0 commit comments

Comments
 (0)