lithium\tests\cases\data\source\DatabaseTest::testScopedUpdate PHP Method

testScopedUpdate() public method

public testScopedUpdate ( )
    public function testScopedUpdate()
    {
        $query = new Query(array('type' => 'update', 'conditions' => array('expires' => array('>=' => '2010-05-13')), 'data' => array('published' => false, 'comments' => null), 'model' => $this->_model));
        $sql = "UPDATE {mock_database_posts} SET {published} = 0, {comments} = NULL WHERE ";
        $sql .= "({expires} >= '2010-05-13');";
        $this->assertEqual($sql, $this->_db->renderCommand($query));
    }
DatabaseTest