Skip to content

Commit

Permalink
[Pelias] changes in unit tests
Browse files Browse the repository at this point in the history
Using assertSame instead of assertEquals
  • Loading branch information
mrbig committed Oct 26, 2023
1 parent 4645cf5 commit 8c4c541
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Provider/Pelias/Tests/AdminLevelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ public function testAdminLevelsOrder()
$result = $provider->geocodeQuery(GeocodeQuery::create('foobar'));

$this->assertInstanceOf(Collection::class, $result);
$this->assertEquals(1, $result->count());
$this->assertSame(1, $result->count());
$address = $result->get(0);

$expectedOrder= [
$expectedOrder = [
'COUNTRY',
'MACROREGION',
'REGION',
Expand All @@ -67,8 +67,8 @@ public function testAdminLevelsOrder()
];

foreach ($address->getAdminLevels()->all() as $key => $adminLevel) {
$this->assertEquals($expectedOrder[$key-1], $adminLevel->getName());
$this->assertEquals($key, $adminLevel->getLevel(), 'Invalid admin level number for level '.$adminLevel->getName());
$this->assertSame($expectedOrder[$key-1], $adminLevel->getName());
$this->assertSame($key, $adminLevel->getLevel(), 'Invalid admin level number for level '.$adminLevel->getName());
}
}
}

0 comments on commit 8c4c541

Please sign in to comment.