lithium\tests\integration\data\source\database\adapter\MySqlTest::testDescribe PHP Method

testDescribe() public method

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