Skip to main content

familytree365/backend

89 stars
1 code files
View familytree365/backend on GitHub

tests/Feature/ApiAuth/LoginTest.php

Open in GitHub
class LoginTest extends ApiAuthTestCase
{
//
protected function getXsrfTokenFromResponse(TestResponse $response): string {
$cookie = collect($response->headers->getCookies())->first(function (Cookie $cookie) {
return $cookie->getName() === 'XSRF-TOKEN';
});
 
return $cookie ? $cookie->getValue() : '';
}
}