We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9be4526 commit 9fef902Copy full SHA for 9fef902
tests/Browser/PluginSettingsTest.php
@@ -35,3 +35,14 @@
35
->toContain(SA_ADMIN_NOTICE)
36
->toContain(SA_INACTIVE_ADMIN_SCRIPT);
37
});
38
+
39
+it('adds a script with a custom domain name', function () {
40
+ asAdmin()
41
+ ->navigate('http://localhost:8100/wp-admin/options-general.php?page=simpleanalytics&tab=general'¬)
42
+ ->fill('simpleanalytics_custom_domain', 'mydomain.com')
43
+ ->click('Save Changes')
44
+ ->assertValue('simpleanalytics_custom_domain', 'mydomain.com');
45
46
+ expect(visit('http://localhost:8100')->content())
47
+ ->toContain(str_replace('scripts.simpleanalyticscdn.com', 'mydomain.com', SA_DEFAULT_SCRIPT));
48
+});
0 commit comments