File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ public function test_set_acp_settings()
4242 $ this ->add_lang ('acp/board ' );
4343 $ this ->add_lang_ext ('phpbb/googleanalytics ' , 'googleanalytics_acp ' );
4444
45+ $ found = false ;
46+
4547 // Load ACP board settings page
4648 $ crawler = self ::request ('GET ' , 'adm/index.php?i=acp_board&mode=settings&sid= ' . $ this ->sid );
4749
@@ -54,9 +56,17 @@ public function test_set_acp_settings()
5456 continue ;
5557 }
5658
59+ $ found = true ;
60+
5761 $ this ->assertContainsLang ('ACP_GOOGLEANALYTICS_ID ' , $ nodes [$ key + 1 ]);
5862 }
5963
64+ // If GA settings not found where expected, test if they exist on page at all
65+ if (!$ found )
66+ {
67+ $ this ->assertContainsLang ('ACP_GOOGLEANALYTICS_ID ' , $ crawler ->text ());
68+ }
69+
6070 // Set GA form values
6171 $ form = $ crawler ->selectButton ($ this ->lang ('SUBMIT ' ))->form ();
6272 $ values = $ form ->getValues ();
You can’t perform that action at this time.
0 commit comments