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