1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/8240] Add ability to get a list of columns of a tables to db_tools.

PHPBB3-8240
This commit is contained in:
Andreas Fischer
2011-10-14 16:29:33 +02:00
parent 234edf674c
commit 4effe8fb8b
2 changed files with 45 additions and 74 deletions

View File

@@ -234,6 +234,14 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case
$this->assertEquals($row2, $row_actual);
}
public function test_list_columns()
{
$this->assertEquals(
array_keys($this->table_data['COLUMNS']),
array_values($this->tools->sql_list_columns('prefix_table_name'))
);
}
public function test_column_exists()
{
$this->assertTrue($this->tools->sql_column_exists('prefix_table_name', 'c_id'));