public function TelephoneFormatterUnitTest::testInvalidNumber in Telephone Formatter 7
Number was successfully parsed but invalid.
File
- tests/
TelephoneFormatterUnitTest.test, line 49
Class
Code
public function testInvalidNumber() {
try {
_telephone_formatter_get_formatted_value('987654320', PhoneNumberFormat::NATIONAL, 'NO');
} catch (InvalidArgumentException $e) {
$this
->pass('InvalidArgumentException was thrown as expected.');
} catch (Exception $e) {
$this
->fail('InvalidArgumentException was not thrown for a succesfully parsed but invalid number.');
}
}