File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,6 +31,6 @@ class ext extends \phpbb\extension\base
3131 */
3232 public function is_enableable ()
3333 {
34- return phpbb_version_compare (PHPBB_VERSION , '4.0.0-dev ' , '>= ' ) && PHP_VERSION_ID >= 80100 ;
34+ return PHP_VERSION_ID >= 80100 && phpbb_version_compare (PHPBB_VERSION , '4.0.0-dev ' , '>= ' );
3535 }
3636}
Original file line number Diff line number Diff line change @@ -104,15 +104,16 @@ public function test_main_module()
104104 ->disableOriginalConstructor ()
105105 ->getMock ();
106106
107+ $ services = ['language ' , 'phpbb.topicprefixes.admin_controller ' ];
108+ $ returns = [$ language , $ admin_controller ];
109+ $ callCount = 0 ;
107110 $ phpbb_container
108111 ->expects (self ::exactly (2 ))
109112 ->method ('get ' )
110- ->withConsecutive (
111- ['language ' ], ['phpbb.topicprefixes.admin_controller ' ]
112- )
113- ->willReturnOnConsecutiveCalls (
114- $ language , $ admin_controller
115- );
113+ ->willReturnCallback (function ($ service ) use ($ services , $ returns , &$ callCount ) {
114+ $ this ->assertEquals ($ services [$ callCount ], $ service );
115+ return $ returns [$ callCount ++];
116+ });
116117
117118 $ admin_controller
118119 ->expects (self ::once ())
You can’t perform that action at this time.
0 commit comments