diff options
Diffstat (limited to 'tests/lib/repair/repairinvalidsharestest.php')
-rw-r--r-- | tests/lib/repair/repairinvalidsharestest.php | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/tests/lib/repair/repairinvalidsharestest.php b/tests/lib/repair/repairinvalidsharestest.php index 005a2db2344..e8dcaa4da97 100644 --- a/tests/lib/repair/repairinvalidsharestest.php +++ b/tests/lib/repair/repairinvalidsharestest.php @@ -162,7 +162,7 @@ class RepairInvalidSharesTest extends TestCase { ->orderBy('id', 'ASC') ->execute(); $rows = $result->fetchAll(); - $this->assertSame([['id' => $parent], ['id' => $validChild], ['id' => $invalidChild]], $rows); + $this->assertEquals([['id' => $parent], ['id' => $validChild], ['id' => $invalidChild]], $rows); $result->closeCursor(); $this->repair->run(); @@ -173,7 +173,7 @@ class RepairInvalidSharesTest extends TestCase { ->orderBy('id', 'ASC') ->execute(); $rows = $result->fetchAll(); - $this->assertSame([['id' => $parent], ['id' => $validChild]], $rows); + $this->assertEquals([['id' => $parent], ['id' => $validChild]], $rows); $result->closeCursor(); } @@ -181,15 +181,7 @@ class RepairInvalidSharesTest extends TestCase { * @return int */ protected function getLastShareId() { - // select because lastInsertId does not work with OCI - $query = $this->connection->getQueryBuilder(); - $result = $query->select('id') - ->from('share') - ->orderBy('id', 'DESC') - ->execute(); - $row = $result->fetch(); - $result->closeCursor(); - return $row['id']; + return $this->connection->lastInsertId('*PREFIX*share'); } } |