1616 */
1717class phpbb_functional_extension_template_event_order_test extends phpbb_functional_test_case
1818{
19- static private $ helper ;
19+ private static $ helper ;
2020
21- static protected $ fixtures = [
21+ protected static $ fixtures = [
2222 './ ' ,
2323 ];
2424
25- static public function setUpBeforeClass (): void
25+ public static function setUpBeforeClass (): void
2626 {
2727 parent ::setUpBeforeClass ();
2828
2929 self ::$ helper = new phpbb_test_case_helpers (__CLASS__ );
3030 self ::$ helper ->copy_ext_fixtures (__DIR__ . '/fixtures/ext/ ' , self ::$ fixtures );
31+
32+ self ::install_ext ('foo/bar ' );
33+ self ::install_ext ('foo/foo ' );
3134 }
3235
33- static public function tearDownAfterClass (): void
36+ public static function tearDownAfterClass (): void
3437 {
3538 parent ::tearDownAfterClass ();
3639
40+ self ::uninstall_ext ('foo/bar ' );
41+ self ::uninstall_ext ('foo/foo ' );
3742 self ::$ helper ->restore_original_ext_dir ();
3843 }
3944
@@ -44,18 +49,6 @@ protected function setUp(): void
4449 $ this ->purge_cache ();
4550 }
4651
47- protected function tearDown (): void
48- {
49- $ this ->uninstall_ext ('foo/bar ' );
50- $ this ->uninstall_ext ('foo/foo ' );
51-
52- parent ::tearDown ();
53- }
54-
55- protected static function setup_extensions ()
56- {
57- return ['foo/bar ' , 'foo/foo ' ];
58- }
5952
6053 /**
6154 * Check extensions template event listener prioritizing
@@ -84,7 +77,7 @@ public function test_different_template_event_priority()
8477 $ crawler = self ::request ('GET ' , 'index.php ' );
8578 $ quick_links_menu = $ crawler ->filter ('ul[role="menu"] ' )->eq (0 );
8679 $ quick_links_menu_nodes_count = (int ) $ quick_links_menu ->filter ('li ' )->count ();
87- // Ensure foo/foo template event goes before foo/bar one
80+ // Ensure foo/bar template event goes before foo/foo one
8881 $ this ->assertStringContainsString ('FOO_BAR_QUICK_LINK ' , $ quick_links_menu ->filter ('li ' )->eq ($ quick_links_menu_nodes_count - 4 )->filter ('span ' )->text ());
8982 $ this ->assertStringContainsString ('FOO_FOO_QUICK_LINK ' , $ quick_links_menu ->filter ('li ' )->eq ($ quick_links_menu_nodes_count - 3 )->filter ('span ' )->text ());
9083 }
0 commit comments