mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[ticket/15987] Go back to previous table definition type
This will still allow using the 'tables' parameter array but will also ensure full backward compatibility and compatibility with extensions that will add more tables to the 'tables' array. PHPBB3-15987
This commit is contained in:
@@ -77,6 +77,18 @@ namespace
|
||||
$this->assertTrue($container->isFrozen());
|
||||
}
|
||||
|
||||
public function test_tables_mapping()
|
||||
{
|
||||
$this->builder->without_cache();
|
||||
$container = $this->builder->get_container();
|
||||
$this->assertTrue($container->hasParameter('tables'));
|
||||
$tables = $container->getParameter('tables');
|
||||
$this->assertGreaterThan(0, count($tables));
|
||||
$this->assertTrue($container->hasParameter('tables.foo_bar'));
|
||||
$this->assertTrue(isset($tables['foo_bar']));
|
||||
$this->assertEquals($tables['acl_groups'], 'phpbb_some_other');
|
||||
}
|
||||
|
||||
public function test_without_cache()
|
||||
{
|
||||
$this->builder->without_cache();
|
||||
|
@@ -1,5 +1,8 @@
|
||||
parameters:
|
||||
core: true
|
||||
tables.acl_groups: '%core.table_prefix%acl_groups'
|
||||
tables.acl_options: '%core.table_prefix%acl_options'
|
||||
tables.acl_roles: '%core.table_prefix%acl_roles'
|
||||
|
||||
services:
|
||||
config.php:
|
||||
|
@@ -1,5 +1,8 @@
|
||||
parameters:
|
||||
core: true
|
||||
tables.acl_groups: '%core.table_prefix%acl_groups'
|
||||
tables.acl_options: '%core.table_prefix%acl_options'
|
||||
tables.acl_roles: '%core.table_prefix%acl_roles'
|
||||
|
||||
services:
|
||||
config.php:
|
||||
|
@@ -1,2 +1,4 @@
|
||||
parameters:
|
||||
enabled_4: true
|
||||
tables.foo_bar: '%core.table_prefix%foo_bar'
|
||||
tables.acl_groups: '%core.table_prefix%some_other'
|
||||
|
Reference in New Issue
Block a user