File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,9 +19,17 @@ static protected function setup_extensions()
1919 return array ('acme/demo ' );
2020 }
2121
22+ protected $ controller ;
23+
24+ public function setUp (): void
25+ {
26+ parent ::setUp ();
27+ $ this ->controller = phpbb_version_compare (PHPBB_VERSION , '4.0.0-a1 ' , '>= ' ) ? 'index ' : 'app ' ;
28+ }
29+
2230 public function test_demo_acme ()
2331 {
24- $ crawler = self ::request ('GET ' , ' app .php/demo/acme ' );
32+ $ crawler = self ::request ('GET ' , $ this -> controller . ' .php/demo/acme ' );
2533 $ this ->assertStringContainsString ('acme ' , $ crawler ->filter ('h2 ' )->text ());
2634
2735 $ this ->add_lang_ext ('acme/demo ' , 'common ' );
@@ -33,7 +41,7 @@ public function test_demo_acme()
3341
3442 public function test_demo_world ()
3543 {
36- $ crawler = self ::request ('GET ' , ' app .php/demo/world ' );
44+ $ crawler = self ::request ('GET ' , $ this -> controller . ' .php/demo/world ' );
3745 $ this ->assertStringNotContainsString ('acme ' , $ crawler ->filter ('h2 ' )->text ());
3846 $ this ->assertStringContainsString ('world ' , $ crawler ->filter ('h2 ' )->text ());
3947 }
You can’t perform that action at this time.
0 commit comments