File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change 3131 ->toContain (SA_INACTIVE_ADMIN_SCRIPT );
3232});
3333
34- it ('adds a script with a custom domain name ' , function () {
35- asAdmin ()
36- ->navigate ('http://localhost:8100/wp-admin/options-general.php?page=simpleanalytics&tab=general ' )
37- ->fill ('simpleanalytics_custom_domain ' , 'mydomain.com ' )
38- ->click ('Save Changes ' )
39- ->assertValue ('simpleanalytics_custom_domain ' , 'mydomain.com ' );
40-
41- $ script = str_replace ('scripts.simpleanalyticscdn.com ' , 'mydomain.com ' , SA_DEFAULT_SCRIPT );
42-
43- expect (visit ('http://localhost:8100 ' )->content ())->toContain ($ script );
44- });
45-
4634it ('adds a script with ignored pages ' , function () {
4735 asAdmin ()
4836 ->navigate ('http://localhost:8100/wp-admin/options-general.php?page=simpleanalytics&tab=ignore-rules ' )
7462 ->toContain (SA_INACTIVE_ADMIN_NOTICE )
7563 ->toContain (SA_INACTIVE_ADMIN_SCRIPT );
7664});
65+
66+ it ('adds a script with a custom domain name ' , function () {
67+ asAdmin ()
68+ ->navigate ('http://localhost:8100/wp-admin/options-general.php?page=simpleanalytics&tab=general ' )
69+ ->fill ('simpleanalytics_custom_domain ' , 'mydomain.com ' )
70+ ->click ('Save Changes ' )
71+ ->assertValue ('simpleanalytics_custom_domain ' , 'mydomain.com ' );
72+
73+ $ script = str_replace ('scripts.simpleanalyticscdn.com ' , 'mydomain.com ' , SA_DEFAULT_SCRIPT );
74+
75+ expect (visit ('http://localhost:8100 ' )->content ())->toContain ($ script );
76+ });
You can’t perform that action at this time.
0 commit comments