From ebac54aa9e705e99a562d2fe2c0f57bc6af8dd32 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 30 Dec 2018 11:36:08 +0100 Subject: [ticket/14948] Adjust calls for twig and phpunit updates PHPBB3-14948 --- tests/di/create_container_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/di/create_container_test.php') diff --git a/tests/di/create_container_test.php b/tests/di/create_container_test.php index 1fd2cbd7ee..8ecad71412 100644 --- a/tests/di/create_container_test.php +++ b/tests/di/create_container_test.php @@ -26,7 +26,7 @@ namespace protected $phpbb_root_path; protected $filename; - public function setUp() + public function setUp(): void { $this->phpbb_root_path = dirname(__FILE__) . '/'; $this->config_php = new \phpbb\config_php_file($this->phpbb_root_path . 'fixtures/', 'php'); -- cgit v1.2.1 From d72498a9c3006210c49cb1690d079d52593db127 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Tue, 14 May 2019 21:20:51 +0200 Subject: [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 --- tests/di/create_container_test.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/di/create_container_test.php') diff --git a/tests/di/create_container_test.php b/tests/di/create_container_test.php index 8ecad71412..16b49d1f17 100644 --- a/tests/di/create_container_test.php +++ b/tests/di/create_container_test.php @@ -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(); -- cgit v1.2.1