lithium\tests\integration\data\source\database\adapter\Sqlite3Test::testDescribe PHP Метод

testDescribe() публичный Метод

Tests that describing a table's schema returns the correct column meta-information.
public testDescribe ( )
    public function testDescribe()
    {
        $result = $this->_db->describe('galleries');
        $expected = array('id' => array('type' => 'integer', 'null' => false, 'default' => null), 'name' => array('type' => 'string', 'length' => 255, 'null' => false, 'default' => null), 'active' => array('type' => 'boolean', 'null' => false, 'default' => null), 'created' => array('type' => 'text', 'null' => false, 'default' => null), 'modified' => array('type' => 'text', 'null' => false, 'default' => null));
        $this->assertEqual($expected, $result->fields());
        unset($expected['name']);
        unset($expected['modified']);
        $result = $this->_db->describe('galleries', $expected)->fields();
        $this->assertEqual($expected, $result);
    }