Changeset View
Changeset View
Standalone View
Standalone View
src/tests/TestCaseDusk.php
Show First 20 Lines • Show All 96 Lines • ▼ Show 20 Lines | abstract class TestCaseDusk extends BaseTestCase | ||||
*/ | */ | ||||
protected static function useAdminUrl(): void | protected static function useAdminUrl(): void | ||||
{ | { | ||||
// This will set baseURL for all tests in this file | // This will set baseURL for all tests in this file | ||||
// If we wanted to visit both user and admin in one test | // If we wanted to visit both user and admin in one test | ||||
// we can also just call visit() with full url | // we can also just call visit() with full url | ||||
Browser::$baseUrl = str_replace('//', '//admin.', \config('app.url')); | Browser::$baseUrl = str_replace('//', '//admin.', \config('app.url')); | ||||
} | } | ||||
/** | |||||
* Set baseURL to the reseller UI location | |||||
*/ | |||||
protected static function useResellerUrl(): void | |||||
{ | |||||
// This will set baseURL for all tests in this file | |||||
// If we wanted to visit both user and admin in one test | |||||
// we can also just call visit() with full url | |||||
Browser::$baseUrl = str_replace('//', '//reseller.', \config('app.url')); | |||||
} | |||||
} | } |