PHPUnit 7: Failed asserting that exception of type InvalidArgumentException is thrown
PHP Snippet 1:
$this->throwException(new \InvalidArgumentException('Ce client inexistant', 400));
PHP Snippet 2:
$this->expectException(Exception::class);
$client = self::createClient();
$client->catchExceptions(false);
$client->request(...);