From e78a11bc4a88d329ac1ee15a846e2c2e3070ff07 Mon Sep 17 00:00:00 2001 From: michalsn Date: Thu, 15 Oct 2020 22:45:15 +0200 Subject: [PATCH] Fix orderBy() test --- tests/system/Database/Live/OrderTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/system/Database/Live/OrderTest.php b/tests/system/Database/Live/OrderTest.php index d63f0f8b1da4..03b905e768da 100644 --- a/tests/system/Database/Live/OrderTest.php +++ b/tests/system/Database/Live/OrderTest.php @@ -72,6 +72,10 @@ public function testOrderRandom() { $key = 'RAND()'; } + elseif ($this->db->DBDriver === 'Sqlsrv') + { + $key = 'NEWID()'; + } $expected = 'SELECT * FROM ' . $this->db->protectIdentifiers('job', true) . ' ORDER BY ' . $key;