Skip to main content

familytree365/backend

90 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() : '';
}
}

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.