Skip to content

Commit 9335943

Browse files
committed
Fix tests
1 parent ee3093d commit 9335943

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

tests/acp/acp_module_test.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,13 @@ public function test_main_module($post)
122122
->disableOriginalConstructor()
123123
->getMock();
124124

125+
$form_helper = $this->createMock(\phpbb\form\form_helper::class);
126+
125127
$phpbb_container
126-
->expects(self::exactly(3))
128+
->expects(self::exactly(4))
127129
->method('get')
128-
->withConsecutive(['language'], ['request'], ['phpbb.ideas.admin.controller'])
129-
->willReturnOnConsecutiveCalls($language, $request, $admin_controller);
130+
->withConsecutive(['language'], ['request'], ['phpbb.ideas.admin.controller'], ['form_helper'])
131+
->willReturnOnConsecutiveCalls($language, $request, $admin_controller, $form_helper);
130132

131133
// Add the phpBB Ideas ACP lang file
132134
$language->expects(self::once())

tests/ext_test.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ public function test_ext()
1919
->disableOriginalConstructor()
2020
->getMock();
2121

22-
/** @var \PHPUnit\Framework\MockObject\MockObject|\phpbb\finder $extension_finder */
23-
$extension_finder = $this->getMockBuilder('\phpbb\finder')
22+
/** @var \PHPUnit\Framework\MockObject\MockObject|\phpbb\finder\finder $extension_finder */
23+
$extension_finder = $this->getMockBuilder('\phpbb\finder\finder')
2424
->disableOriginalConstructor()
2525
->getMock();
2626

tests/template/status_icon_test.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ protected function setup_engine(array $new_config = array())
4343
$cache_path = $phpbb_root_path . 'cache/twig';
4444
$context = new \phpbb\template\context();
4545
$loader = new \phpbb\template\twig\loader();
46+
$assets_bag = new \phpbb\template\assets_bag();
4647
$twig = new \phpbb\template\twig\environment(
48+
$assets_bag,
4749
$config,
4850
$filesystem,
4951
$path_helper,

0 commit comments

Comments
 (0)