aboutsummaryrefslogtreecommitdiffstats
path: root/tests/extension
diff options
context:
space:
mode:
Diffstat (limited to 'tests/extension')
-rw-r--r--tests/extension/ext/vendor2/bar/acp/a_info.php1
-rw-r--r--tests/extension/ext/vendor2/foo/acp/a_info.php1
-rw-r--r--tests/extension/ext/vendor2/foo/acp/fail_info.php1
-rw-r--r--tests/extension/ext/vendor2/foo/mcp/a_info.php1
-rw-r--r--tests/extension/includes/acp/info/acp_foobar.php1
-rw-r--r--tests/extension/metadata_manager_test.php38
-rw-r--r--tests/extension/modules_test.php10
7 files changed, 26 insertions, 27 deletions
diff --git a/tests/extension/ext/vendor2/bar/acp/a_info.php b/tests/extension/ext/vendor2/bar/acp/a_info.php
index 8132df587f..8268006f9f 100644
--- a/tests/extension/ext/vendor2/bar/acp/a_info.php
+++ b/tests/extension/ext/vendor2/bar/acp/a_info.php
@@ -9,7 +9,6 @@ class a_info
return array(
'filename' => 'vendor2\\bar\\acp\\a_module',
'title' => 'Bar',
- 'version' => '3.1.0-dev',
'modes' => array(
'config' => array('title' => 'Config', 'auth' => '', 'cat' => array('ACP_MODS')),
),
diff --git a/tests/extension/ext/vendor2/foo/acp/a_info.php b/tests/extension/ext/vendor2/foo/acp/a_info.php
index e1eaa340b7..48ab4cf8e7 100644
--- a/tests/extension/ext/vendor2/foo/acp/a_info.php
+++ b/tests/extension/ext/vendor2/foo/acp/a_info.php
@@ -9,7 +9,6 @@ class a_info
return array(
'filename' => 'vendor2\\foo\\acp\\a_module',
'title' => 'Foobar',
- 'version' => '3.1.0-dev',
'modes' => array(
'config' => array('title' => 'Config', 'auth' => 'ext_vendor2/foo', 'cat' => array('ACP_MODS')),
),
diff --git a/tests/extension/ext/vendor2/foo/acp/fail_info.php b/tests/extension/ext/vendor2/foo/acp/fail_info.php
index d9b4353957..78479fee70 100644
--- a/tests/extension/ext/vendor2/foo/acp/fail_info.php
+++ b/tests/extension/ext/vendor2/foo/acp/fail_info.php
@@ -13,7 +13,6 @@ class foo_info
return array(
'filename' => 'vendor2\foo\acp\fail_module',
'title' => 'Foobar',
- 'version' => '3.1.0-dev',
'modes' => array(
'config' => array('title' => 'Config', 'auth' => '', 'cat' => array('ACP_MODS')),
),
diff --git a/tests/extension/ext/vendor2/foo/mcp/a_info.php b/tests/extension/ext/vendor2/foo/mcp/a_info.php
index b5599fde65..2532e44b12 100644
--- a/tests/extension/ext/vendor2/foo/mcp/a_info.php
+++ b/tests/extension/ext/vendor2/foo/mcp/a_info.php
@@ -9,7 +9,6 @@ class a_info
return array(
'filename' => 'vendor2\\foo\\mcp\\a_module',
'title' => 'Foobar',
- 'version' => '3.1.0-dev',
'modes' => array(
'config' => array('title' => 'Config', 'auth' => '', 'cat' => array('MCP_MAIN')),
),
diff --git a/tests/extension/includes/acp/info/acp_foobar.php b/tests/extension/includes/acp/info/acp_foobar.php
index 870225ba4f..8ca1afa1c6 100644
--- a/tests/extension/includes/acp/info/acp_foobar.php
+++ b/tests/extension/includes/acp/info/acp_foobar.php
@@ -18,7 +18,6 @@ class acp_foobar_info
return array(
'filename' => 'acp_foobar',
'title' => 'ACP Foobar',
- 'version' => '3.1.0-dev',
'modes' => array(
'test' => array('title' => 'Test', 'auth' => '', 'cat' => array('ACP_GENERAL')),
),
diff --git a/tests/extension/metadata_manager_test.php b/tests/extension/metadata_manager_test.php
index 8e27b39459..ead0076d90 100644
--- a/tests/extension/metadata_manager_test.php
+++ b/tests/extension/metadata_manager_test.php
@@ -47,20 +47,35 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
$this->user = new \phpbb\user('\phpbb\datetime');
$this->table_prefix = 'phpbb_';
- $this->template = new \phpbb\template\twig\twig(
- new \phpbb\path_helper(
- new \phpbb\symfony_request(
- new phpbb_mock_request()
- ),
- new \phpbb\filesystem(),
- $this->getMock('\phpbb\request\request'),
- $this->phpbb_root_path,
- $this->phpEx
+ $container = new phpbb_mock_container_builder();
+ $cache_path = $this->phpbb_root_path . 'cache/twig';
+ $context = new \phpbb\template\context();
+ $loader = new \phpbb\template\twig\loader('');
+ $phpbb_path_helper =new \phpbb\path_helper(
+ new \phpbb\symfony_request(
+ new phpbb_mock_request()
),
+ new \phpbb\filesystem(),
+ $this->getMock('\phpbb\request\request'),
+ $this->phpbb_root_path,
+ $this->phpEx
+ );
+ $twig = new \phpbb\template\twig\environment(
$this->config,
- $this->user,
- new \phpbb\template\context()
+ $phpbb_path_helper,
+ $container,
+ $cache_path,
+ null,
+ $loader,
+ array(
+ 'cache' => false,
+ 'debug' => false,
+ 'auto_reload' => true,
+ 'autoescape' => false,
+ )
);
+ $this->template = new phpbb\template\twig\twig($phpbb_path_helper, $this->config, $this->user, $context, $twig, $cache_path, array(new \phpbb\template\twig\extension($context, $this->user)));
+ $container->set('template.twig.lexer', new \phpbb\template\twig\lexer($twig));
$this->migrator = new \phpbb\db\migrator(
$this->config,
@@ -73,7 +88,6 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
array(),
new \phpbb\db\migration\helper()
);
- $container = new phpbb_mock_container_builder();
$container->set('migrator', $this->migrator);
$this->extension_manager = new \phpbb\extension\manager(
diff --git a/tests/extension/modules_test.php b/tests/extension/modules_test.php
index 21f1c6aca5..cbcfdfb787 100644
--- a/tests/extension/modules_test.php
+++ b/tests/extension/modules_test.php
@@ -62,7 +62,6 @@ class phpbb_extension_modules_test extends phpbb_test_case
'vendor2\\foo\\acp\\a_module' => array(
'filename' => 'vendor2\\foo\\acp\\a_module',
'title' => 'Foobar',
- 'version' => '3.1.0-dev',
'modes' => array(
'config' => array('title' => 'Config', 'auth' => 'ext_vendor2/foo', 'cat' => array('ACP_MODS')),
),
@@ -70,7 +69,6 @@ class phpbb_extension_modules_test extends phpbb_test_case
'acp_foobar' => array(
'filename' => 'acp_foobar',
'title' => 'ACP Foobar',
- 'version' => '3.1.0-dev',
'modes' => array(
'test' => array('title' => 'Test', 'auth' => '', 'cat' => array('ACP_GENERAL')),
),
@@ -84,7 +82,6 @@ class phpbb_extension_modules_test extends phpbb_test_case
'vendor2\\foo\\mcp\\a_module' => array(
'filename' => 'vendor2\\foo\\mcp\\a_module',
'title' => 'Foobar',
- 'version' => '3.1.0-dev',
'modes' => array(
'config' => array('title' => 'Config', 'auth' => '', 'cat' => array('MCP_MAIN')),
),
@@ -98,7 +95,6 @@ class phpbb_extension_modules_test extends phpbb_test_case
'vendor2\\foo\\mcp\\a_module' => array(
'filename' => 'vendor2\\foo\\mcp\\a_module',
'title' => 'Foobar',
- 'version' => '3.1.0-dev',
'modes' => array(
'config' => array('title' => 'Config', 'auth' => '', 'cat' => array('MCP_MAIN')),
),
@@ -112,7 +108,6 @@ class phpbb_extension_modules_test extends phpbb_test_case
'vendor2\\foo\\mcp\\a_module' => array(
'filename' => 'vendor2\\foo\\mcp\\a_module',
'title' => 'Foobar',
- 'version' => '3.1.0-dev',
'modes' => array(
'config' => array('title' => 'Config', 'auth' => '', 'cat' => array('MCP_MAIN')),
),
@@ -136,7 +131,6 @@ class phpbb_extension_modules_test extends phpbb_test_case
'vendor2\\foo\\acp\\a_module' => array (
'filename' => 'vendor2\\foo\\acp\\a_module',
'title' => 'Foobar',
- 'version' => '3.1.0-dev',
'modes' => array (
'config' => array ('title' => 'Config', 'auth' => 'ext_vendor2/foo', 'cat' => array ('ACP_MODS')),
),
@@ -160,7 +154,6 @@ class phpbb_extension_modules_test extends phpbb_test_case
'vendor2\\foo\\acp\\a_module' => array(
'filename' => 'vendor2\\foo\\acp\\a_module',
'title' => 'Foobar',
- 'version' => '3.1.0-dev',
'modes' => array(
'config' => array('title' => 'Config', 'auth' => 'ext_vendor2/foo', 'cat' => array('ACP_MODS')),
),
@@ -168,7 +161,6 @@ class phpbb_extension_modules_test extends phpbb_test_case
'acp_foobar' => array(
'filename' => 'acp_foobar',
'title' => 'ACP Foobar',
- 'version' => '3.1.0-dev',
'modes' => array(
'test' => array('title' => 'Test', 'auth' => '', 'cat' => array('ACP_GENERAL')),
),
@@ -176,7 +168,6 @@ class phpbb_extension_modules_test extends phpbb_test_case
'vendor2\\bar\\acp\\a_module' => array(
'filename' => 'vendor2\\bar\\acp\\a_module',
'title' => 'Bar',
- 'version' => '3.1.0-dev',
'modes' => array(
'config' => array('title' => 'Config', 'auth' => '', 'cat' => array('ACP_MODS')),
),
@@ -189,7 +180,6 @@ class phpbb_extension_modules_test extends phpbb_test_case
'vendor2\\bar\\acp\\a_module' => array(
'filename' => 'vendor2\\bar\\acp\\a_module',
'title' => 'Bar',
- 'version' => '3.1.0-dev',
'modes' => array(
'config' => array('title' => 'Config', 'auth' => '', 'cat' => array('ACP_MODS')),
),