Skip to content

Commit

Permalink
Add Unit Test for Issue #3
Browse files Browse the repository at this point in the history
  • Loading branch information
giggsey committed Jul 31, 2013
1 parent eb1038c commit 06233b7
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions Tests/Issue3Test.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php
/**
*
*
* @author joshuag
* @created: 31/07/13 17:09
* @project libphonenumber-for-php
*/

namespace libphonenumber\Tests;

require_once __DIR__ . '/../vendor/autoload.php';


use libphonenumber\PhoneNumberFormat;
use libphonenumber\PhoneNumberUtil;

class Issue3Test extends \PHPUnit_Framework_TestCase {

/**
* @var PhoneNumberUtil
*/
public $phoneNumberUtil;

public function setUp()
{
$this->phoneNumberUtil = PhoneNumberUtil::getInstance();
}

public function testParseUSNumber()
{
$number = $this->phoneNumberUtil->parse('011543549480042', 'US');

$this->assertEquals("+543549480042", $this->phoneNumberUtil->format($number, PhoneNumberFormat::E164));

}
}

/* EOF */

0 comments on commit 06233b7

Please sign in to comment.