Commit 7b3b8c11 authored by Maximilian Ruta's avatar Maximilian Ruta Committed by GitHub

Deterministic results for ModifyLimitQueryTest

parent 61e1f860
...@@ -103,11 +103,11 @@ class ModifyLimitQueryTest extends \Doctrine\Tests\DbalFunctionalTestCase ...@@ -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' => 3));
$this->_conn->insert('modify_limit_table', array('test_int' => 4)); $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, 2, 1), $sql, 10, 0);
$this->assertLimitResult(array(4, 3), $sql, 2, 0, false); $this->assertLimitResult(array(4, 3), $sql, 2, 0);
$this->assertLimitResult(array(2, 1), $sql, 2, 2, false); $this->assertLimitResult(array(2, 1), $sql, 2, 2);
} }
public function assertLimitResult($expectedResults, $sql, $limit, $offset, $deterministic = true) 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