Changeset View
Changeset View
Standalone View
Standalone View
src/tests/TestCase.php
Show First 20 Lines • Show All 99 Lines • ▼ Show 20 Lines | protected static function useServicesUrl(): void | ||||
// reset to base | // reset to base | ||||
self::useRegularUrl(); | self::useRegularUrl(); | ||||
// then modify it | // then modify it | ||||
\config(['app.url' => str_replace('//', '//services.', \config('app.url'))]); | \config(['app.url' => str_replace('//', '//services.', \config('app.url'))]); | ||||
url()->forceRootUrl(config('app.url')); | url()->forceRootUrl(config('app.url')); | ||||
} | } | ||||
/** | |||||
* The test equivalent of Http::withBody, which is not available for tests. | |||||
* | |||||
* Required to test request handlers that use Request::getContent | |||||
*/ | |||||
protected function postWithBody($url, $content) | |||||
{ | |||||
return $this->call('POST', $url, [], [], [], [], $content); | |||||
} | |||||
} | } |