1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-09 10:16:36 +02:00

Merge pull request #5583 from marc1706/ticket/15987

[ticket/15987] Table parameters as array
This commit is contained in:
Marc Alexander
2019-06-05 21:45:42 +02:00
6 changed files with 85 additions and 1 deletions

View File

@@ -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();

View File

@@ -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:

View File

@@ -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:

View File

@@ -1,2 +1,4 @@
parameters:
enabled_4: true
tables.foo_bar: '%core.table_prefix%foo_bar'
tables.acl_groups: '%core.table_prefix%some_other'