It seems like $response->getSymfonyResponse()->getContent() targeting Symfony\Component\HttpFo...\Response::getContent() can also be of type false; however, PHPUnit\Framework\Assert...tringEqualsJsonString() does only seem to accept string, did you maybe forget to handle an error condition?