diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-08-19 12:06:00 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-08-26 11:54:25 +0200 |
commit | ac8941f6ac919464b672db5961f14604d681c628 (patch) | |
tree | a305f2627182f14ebd3a2810e053ab517315fb40 | |
parent | f4186d3dfccc80c6a819c94ece8883c981a9d013 (diff) | |
download | nextcloud-server-ac8941f6ac919464b672db5961f14604d681c628.tar.gz nextcloud-server-ac8941f6ac919464b672db5961f14604d681c628.zip |
Manually query for the last id
-rw-r--r-- | apps/files_sharing/tests/api/shareestest.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/apps/files_sharing/tests/api/shareestest.php b/apps/files_sharing/tests/api/shareestest.php index c856b93d0fe..3b2e17d9fdc 100644 --- a/apps/files_sharing/tests/api/shareestest.php +++ b/apps/files_sharing/tests/api/shareestest.php @@ -859,7 +859,17 @@ class ShareesTest extends TestCase { ]) ->setParameter('expiration', null, 'datetime') ->execute(); - return $connection->lastInsertId('share'); + + $queryBuilder = $connection->getQueryBuilder(); + $query = $queryBuilder->select('id') + ->from('share') + ->orderBy('id', 'DESC') + ->setMaxResults(1) + ->execute(); + $share = $query->fetch(); + $query->closeCursor(); + + return (int) $share['id']; } /** |