Unique columns test

This commit is contained in:
Michal Čihař 2012-10-19 11:15:51 +02:00
parent f7dad085d1
commit 634db720e1
2 changed files with 18 additions and 0 deletions

View File

@ -111,6 +111,10 @@ $GLOBALS['dummy_queries'] = array(
array('o', 'int(11)', 'NO', 'MUL', 'NULL', ''),
)
),
array(
'query' => 'SHOW INDEXES FROM `pma_test`.`table1` WHERE (Non_unique = 0)',
'result' => array(),
),
array(
'query' => 'SHOW COLUMNS FROM `pma_test`.`table2`',
'columns' => array(

View File

@ -83,5 +83,19 @@ class PMA_Table_Test extends PHPUnit_Framework_TestCase
$table->getColumns()
);
}
/**
* Test getting unique columns
*
* @return void
*/
public function testUniqueColumns()
{
$table = new PMA_Table('table1', 'pma_test');
$this->assertEquals(
array(),
$table->getUniqueColumns()
);
}
}