validate() публичный статический Метод

public static validate ( string $phoneNumber, string $country = null ) : boolean
$phoneNumber string
$country string
Результат boolean
Пример #1
0
 /**
  * @param mixed  $value
  * @param string $country
  *
  * @dataProvider getInvalidValues
  */
 public function testInvalidValues($value, $country)
 {
     $this->assertFalse(PhoneNumber::validate($value, $country));
 }
Пример #2
0
 /**
  * testUSPhoneNumber.
  *
  * @param mixed  $code
  * @param string $country
  * @param bool   $result
  *
  * @dataProvider phoneNumbers
  */
 public function testUSPhoneNumber($code, $country, $result)
 {
     $this->assertEquals(PhoneNumber::validate($code, $country), $result);
 }