Commit 4dec3f73 authored by Steve Müller's avatar Steve Müller Committed by GitHub

Merge pull request #2413 from Deltachaos/deterministic-modifylimitquerytest

Deterministic results for ModifyLimitQueryTest
parents d6b1e110 7b3b8c11
......@@ -103,11 +103,11 @@ class ModifyLimitQueryTest extends \Doctrine\Tests\DbalFunctionalTestCase
$this->_conn->insert('modify_limit_table', array('test_int' => 3));
$this->_conn->insert('modify_limit_table', array('test_int' => 4));
$sql = "SELECT modify_limit_table.*, (SELECT COUNT(*) FROM modify_limit_table) AS cnt FROM modify_limit_table";
$sql = "SELECT modify_limit_table.*, (SELECT COUNT(*) FROM modify_limit_table) AS cnt FROM modify_limit_table ORDER BY test_int DESC";
$this->assertLimitResult(array(4, 3, 2, 1), $sql, 10, 0, false);
$this->assertLimitResult(array(4, 3), $sql, 2, 0, false);
$this->assertLimitResult(array(2, 1), $sql, 2, 2, false);
$this->assertLimitResult(array(4, 3, 2, 1), $sql, 10, 0);
$this->assertLimitResult(array(4, 3), $sql, 2, 0);
$this->assertLimitResult(array(2, 1), $sql, 2, 2);
}
public function assertLimitResult($expectedResults, $sql, $limit, $offset, $deterministic = true)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment