private function assertGeneratorLocaleIsNot(string $locale, FakerGenerator $generator)
{
try {
$this->assertGeneratorLocaleIs($locale, $generator);
return;
} catch (\Exception $exception) {
if ($exception->getMessage() === sprintf('Generator has not been initialised with the locale "%s".', $locale)) {
return;
}
throw $exception;
}
throw new \Exception(sprintf('Generator has been initialised with the locale "%s".', $locale));
}