mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-09 11:38:52 +00:00
[ticket/17525] Fix tests
PHPBB-17525
This commit is contained in:
parent
4274faa715
commit
e9157f4d10
3 changed files with 12 additions and 4 deletions
|
@ -62,7 +62,7 @@ class doctrine implements tools_interface
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Connection
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
public function get_connection(): Connection
|
public function get_connection(): Connection
|
||||||
{
|
{
|
||||||
|
|
|
@ -226,4 +226,11 @@ interface tools_interface
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function sql_truncate_table(string $table_name): void;
|
public function sql_truncate_table(string $table_name): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets current Doctrine DBAL connection
|
||||||
|
*
|
||||||
|
* @return \Doctrine\DBAL\Connection
|
||||||
|
*/
|
||||||
|
public function get_connection(): \Doctrine\DBAL\Connection;
|
||||||
}
|
}
|
||||||
|
|
|
@ -485,9 +485,10 @@ class phpbb_dbal_migrator_test extends phpbb_database_test_case
|
||||||
|
|
||||||
$this->assertNotEmpty($table_keys);
|
$this->assertNotEmpty($table_keys);
|
||||||
|
|
||||||
$short_table_names = \phpbb\db\doctrine\table_helper::map_short_table_names(['custom_table' => 'cstmtbl'], 'phpbb_');
|
$table_names = array_merge(array_keys($db_table_schema), ['phpbb_custom_table']);
|
||||||
$this->assertEquals('phpbb_custom_table', array_search('cstmtbl', $short_table_names));
|
$short_table_names = \phpbb\db\doctrine\table_helper::map_short_table_names($table_names, 'phpbb_');
|
||||||
$this->assertEquals($short_table_names['phpbb_custom_table'], 'cstmtbl');
|
$this->assertEquals('phpbb_custom_table', array_search(\phpbb\db\doctrine\table_helper::generate_shortname('custom_table'), $short_table_names));
|
||||||
|
$this->assertEquals($short_table_names['phpbb_custom_table'], \phpbb\db\doctrine\table_helper::generate_shortname('custom_table'));
|
||||||
|
|
||||||
foreach ($table_keys as $table_name => $key_names)
|
foreach ($table_keys as $table_name => $key_names)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue