@@ -68,12 +68,15 @@ public function test_steps()
6868
6969 protected function create_extension_manager ()
7070 {
71- global $ phpbb_root_path , $ php_ext ;
71+ $ phpbb_root_path = __DIR__ . './../../../../ ' ;
72+ $ php_ext = 'php ' ;
7273
7374 $ config = new \phpbb \config \config (['version ' => PHPBB_VERSION , 'allow_board_notifications ' => 1 ]);
7475 $ phpbb_dispatcher = new \phpbb_mock_event_dispatcher ();
7576 $ factory = new \phpbb \db \tools \factory ();
76- $ db_tools = $ factory ->get ($ this ->db );
77+ $ finder_factory = new \phpbb \finder \factory (null , false , $ phpbb_root_path , $ php_ext );
78+ $ db_doctrine = $ this ->new_doctrine_dbal ();
79+ $ db_tools = $ factory ->get ($ db_doctrine );
7780 $ table_prefix = 'phpbb_ ' ;
7881
7982 $ container = new \phpbb_mock_container_builder ();
@@ -87,11 +90,12 @@ protected function create_extension_manager()
8790 $ phpbb_root_path ,
8891 $ php_ext ,
8992 $ table_prefix ,
93+ self ::get_core_tables (),
9094 [],
9195 new \phpbb \db \migration \helper ()
9296 );
9397 $ container ->set ('migrator ' , $ migrator );
94- $ container ->set ('dispatcher ' , $ phpbb_dispatcher );
98+ $ container ->set ('event_dispatcher ' , $ phpbb_dispatcher );
9599
96100 $ cache_driver = new \phpbb \cache \driver \dummy ();
97101 $ cache = new \phpbb \cache \service (
@@ -105,7 +109,11 @@ protected function create_extension_manager()
105109
106110 $ language = new \phpbb \language \language (new \phpbb \language \language_file_loader ($ phpbb_root_path , $ php_ext ));
107111
108- $ user_loader = new \phpbb \user_loader ($ this ->db , $ phpbb_root_path , $ php_ext , USERS_TABLE );
112+ $ avatar_helper = $ this ->getMockBuilder ('\phpbb\avatar\helper ' )
113+ ->disableOriginalConstructor ()
114+ ->getMock ();
115+
116+ $ user_loader = new \phpbb \user_loader ($ avatar_helper , $ this ->db , $ phpbb_root_path , $ php_ext , USERS_TABLE );
109117 $ user = $ this ->createMock ('\phpbb\user ' );
110118
111119 $ container ->set ('notification.method.board ' , new \phpbb \notification \method \board (
@@ -137,10 +145,9 @@ protected function create_extension_manager()
137145 $ container ,
138146 $ this ->db ,
139147 $ config ,
140- new \ phpbb \ filesystem \ filesystem () ,
141- EXT_TABLE ,
148+ $ finder_factory ,
149+ ' phpbb_ext ' ,
142150 $ phpbb_root_path ,
143- $ php_ext ,
144151 null
145152 );
146153 }
0 commit comments