public function testBankAccountNumber($locale)
{
$parts = explode('_', $locale);
$countryCode = array_pop($parts);
if (!isset($this->ibanFormats[$countryCode])) {
// No IBAN format available
return;
}
$this->loadLocalProviders($locale);
try {
$iban = $this->faker->bankAccountNumber;
} catch (\InvalidArgumentException $e) {
// Not implemented, nothing to test
$this->markTestSkipped("bankAccountNumber not implemented for {$locale}");
return;
}
// Test format
$this->assertRegExp($this->ibanFormats[$countryCode], $iban);
// Test checksum
$this->assertTrue(Iban::isValid($iban), "Checksum for {$iban} is invalid");
}