mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR: Don't run MySQL-specific tests on any other database
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79350 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
4df21d29e0
commit
5fb45eb846
@ -69,23 +69,26 @@ class SQLQueryTest extends SapphireTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function testSelectWithLimitClause() {
|
function testSelectWithLimitClause() {
|
||||||
// numeric limit
|
// These are MySQL specific :-S
|
||||||
$query = new SQLQuery();
|
if(DB::getConn() instanceof MySQLDatabase) {
|
||||||
$query->from[] = "MyTable";
|
// numeric limit
|
||||||
$query->limit("99");
|
$query = new SQLQuery();
|
||||||
$this->assertEquals("SELECT * FROM MyTable LIMIT 99", $query->sql());
|
$query->from[] = "MyTable";
|
||||||
|
$query->limit("99");
|
||||||
|
$this->assertEquals("SELECT * FROM MyTable LIMIT 99", $query->sql());
|
||||||
|
|
||||||
// array limit
|
// array limit
|
||||||
$query = new SQLQuery();
|
$query = new SQLQuery();
|
||||||
$query->from[] = "MyTable";
|
$query->from[] = "MyTable";
|
||||||
$query->limit(array('limit'=>99));
|
$query->limit(array('limit'=>99));
|
||||||
$this->assertEquals("SELECT * FROM MyTable LIMIT 99", $query->sql());
|
$this->assertEquals("SELECT * FROM MyTable LIMIT 99", $query->sql());
|
||||||
|
|
||||||
// array limit with start (MySQL specific)
|
// array limit with start (MySQL specific)
|
||||||
$query = new SQLQuery();
|
$query = new SQLQuery();
|
||||||
$query->from[] = "MyTable";
|
$query->from[] = "MyTable";
|
||||||
$query->limit(array('limit'=>99, 'start'=>97));
|
$query->limit(array('limit'=>99, 'start'=>97));
|
||||||
$this->assertEquals("SELECT * FROM MyTable LIMIT 99 OFFSET 97", $query->sql());
|
$this->assertEquals("SELECT * FROM MyTable LIMIT 99 OFFSET 97", $query->sql());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function testSelectWithOrderbyClause() {
|
function testSelectWithOrderbyClause() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user