function PhonePanamanianTest::testFormattingPanamenianPhoneNumber in Phone 7
Same name and namespace in other branches
- 6 tests/phone-pa.test \PhonePanamanianTest::testFormattingPanamenianPhoneNumber()
File
- tests/
phone.pa.test, line 41
Class
Code
function testFormattingPanamenianPhoneNumber() {
$this
->assertEqual(format_phone_number('pa', '+507 260-4334'), '+507 260-4334', '+507 260-4334 format');
$this
->assertEqual(format_phone_number('pa', '+507 2604334'), '+507 260-4334', '+507 2604334 format');
$this
->assertEqual(format_phone_number('pa', '+507 260 4334'), '+507 260-4334', '+507 260 4334 format');
$this
->assertEqual(format_phone_number('pa', '00507 260-4334'), '+507 260-4334', '00507 260-4334 format');
$this
->assertEqual(format_phone_number('pa', '00507 2604334'), '+507 260-4334', '00507 2604334 format');
$this
->assertEqual(format_phone_number('pa', '00507 260 4334'), '+507 260-4334', '00507 260 4334 format');
$this
->assertEqual(format_phone_number('pa', '260-4334'), '260-4334', '260-4334 format');
$this
->assertEqual(format_phone_number('pa', '2604334'), '260-4334', '2604334 format');
$this
->assertEqual(format_phone_number('pa', '260 4334'), '260-4334', '260 4334 format');
$this
->assertEqual(format_phone_number('pa', '260 4334', array(
'phone_country_code' => 1,
)), '+507 260-4334', 'add +507 to 260 4334 format');
//Cellphones
$this
->assertEqual(format_phone_number('pa', '00507 6464 4334'), '+507 6464-4334', '6464 4334 format');
$this
->assertEqual(format_phone_number('pa', '00507 6464-4334'), '+507 6464-4334', '00507 6464-4334 format');
$this
->assertEqual(format_phone_number('pa', '00507 64644334'), '+507 6464-4334', '00507 64644334 format');
$this
->assertEqual(format_phone_number('pa', '+507 6464 4334'), '+507 6464-4334', '+507 6464 4334 format');
$this
->assertEqual(format_phone_number('pa', '6464 4334'), '6464-4334', '6464 4334 format');
$this
->assertEqual(format_phone_number('pa', '64644334'), '6464-4334', '6464-4334 format');
$this
->assertEqual(format_phone_number('pa', '6464 4334', array(
'phone_country_code' => 1,
)), '+507 6464-4334', 'add +507 to 6464 4334 format');
}