Skip to content

Commit

Permalink
Add test confirming #14 is fixed
Browse files Browse the repository at this point in the history
Wasn't actually a bug, but the online demo was running an older version
of libphonenumber-for-php that wasn't up to date.
  • Loading branch information
giggsey committed Dec 2, 2013
1 parent 7e563c9 commit baad658
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions Tests/libphonenumber/Tests/Issues/Issue14Test.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php
/**
*
*
* @author giggsey
* @created: 02/12/13 18:46
* @project libphonenumber-for-php
*/
namespace libphonenumber\Tests\Issues;


use libphonenumber\PhoneNumberType;
use libphonenumber\PhoneNumberUtil;

class Issue14Test extends \PHPUnit_Framework_TestCase {
/**
* @var PhoneNumberUtil
*/
private $phoneUtil;

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

public function testKWMobileNumber()
{
$number = "51440519";
$phoneNumber = $this->phoneUtil->parse($number, "KW");

$this->assertTrue($this->phoneUtil->isValidNumber($phoneNumber));
$this->assertEquals(PhoneNumberType::MOBILE, $this->phoneUtil->getNumberType($phoneNumber));
}
}

/* EOF */

0 comments on commit baad658

Please sign in to comment.