Location: PHPKode > projects > DIY Blog > diy-blog/lib/creole/test/classes/creole/drivers/odbc/ODBCConnectionTest.php
<?php

require_once 'creole/ConnectionTest.php';

/**
 * ODBCConnection tests.
 * 
 * 
 * @author Hans Lellelid <hide@address.com>
 * @version $Revision: 1.1 $
 */
class ODBCConnectionTest extends ConnectionTest {

    /**
     * Test the applyLimit() method.  By default this method will not modify the values provided.
     * Subclasses must override this method to test for appropriate SQL modifications.
     */
    public function testApplyLimit() {

        $sql = "SELECT * FROM sampletable WHERE category = 5";
        $offset = 5;
        $limit = 50;

        if (!$this->conn->getAdapter()->hasLimitOffset())
        {
            $this->conn->applyLimit($sql, $offset, $limit);
            $this->assertEquals("SELECT * FROM sampletable WHERE category = 5", $sql);
        }
    }

}
Return current item: DIY Blog