Skip to content

Commit 3ba5593

Browse files
committed
Test that getId no longer has contemporaneous collisions
1 parent b3ccb64 commit 3ba5593

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

tests/Database/Base.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1680,4 +1680,15 @@ public function testGetIndexLimit()
16801680
{
16811681
$this->assertEquals(61, $this->getDatabase()->getIndexLimit());
16821682
}
1683+
1684+
public function testGetId()
1685+
{
1686+
$this->assertEquals(13, strlen($this->getDatabase()->getId()));
1687+
$this->assertEquals(13, strlen($this->getDatabase()->getId(0)));
1688+
$this->assertEquals(13, strlen($this->getDatabase()->getId(-1)));
1689+
$this->assertEquals(23, strlen($this->getDatabase()->getId(10)));
1690+
1691+
// ensure two sequential calls to getId do not give the same result
1692+
$this->assertNotEquals($this->getDatabase()->getId(10), $this->getDatabase()->getId(10));
1693+
}
16831694
}

0 commit comments

Comments
 (0)