aboutsummaryrefslogtreecommitdiffstats
path: root/tests/mock/container_builder.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mock/container_builder.php')
-rw-r--r--tests/mock/container_builder.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/mock/container_builder.php b/tests/mock/container_builder.php
index 297e3a65e6..134589b0b8 100644
--- a/tests/mock/container_builder.php
+++ b/tests/mock/container_builder.php
@@ -52,7 +52,15 @@ class phpbb_mock_container_builder implements ContainerInterface
{
if ($this->has($id))
{
- return $this->services[$id];
+ $service = $this->services[$id];
+ if (is_array($service) && is_callable($service[0]))
+ {
+ return call_user_func_array($service[0], $service[1]);
+ }
+ else
+ {
+ return $service;
+ }
}
throw new Exception('Could not find service: ' . $id);
@@ -180,4 +188,9 @@ class phpbb_mock_container_builder implements ContainerInterface
public function isScopeActive($name)
{
}
+
+ public function isFrozen()
+ {
+ return false;
+ }
}