Skip to content

Commit 9fef902

Browse files
committed
custom domain
1 parent 9be4526 commit 9fef902

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/Browser/PluginSettingsTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,14 @@
3535
->toContain(SA_ADMIN_NOTICE)
3636
->toContain(SA_INACTIVE_ADMIN_SCRIPT);
3737
});
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

Comments
 (0)