public function TelephoneFieldTest::providerPhoneNumbers in Drupal 8
Same name and namespace in other branches
- 9 core/modules/telephone/tests/src/Functional/TelephoneFieldTest.php \Drupal\Tests\telephone\Functional\TelephoneFieldTest::providerPhoneNumbers()
Provides the phone numbers to check and expected results.
File
- core/
modules/ telephone/ tests/ src/ Functional/ TelephoneFieldTest.php, line 116
Class
- TelephoneFieldTest
- Tests the creation of telephone fields.
Namespace
Drupal\Tests\telephone\FunctionalCode
public function providerPhoneNumbers() {
return [
'standard phone number' => [
'123456789',
'123456789',
],
'whitespace is removed' => [
'1234 56789',
'123456789',
],
'parse_url(0) return FALSE workaround' => [
'0',
'0-',
],
'php bug 70588 workaround - lower edge check' => [
'1',
'1-',
],
'php bug 70588 workaround' => [
'123',
'1-23',
],
'php bug 70588 workaround - with whitespace removal' => [
'1 2 3 4 5',
'1-2345',
],
'php bug 70588 workaround - upper edge check' => [
'65534',
'6-5534',
],
'php bug 70588 workaround - edge check' => [
'65535',
'6-5535',
],
'php bug 70588 workaround - invalid port number - lower edge check' => [
'65536',
'6-5536',
],
'php bug 70588 workaround - invalid port number - upper edge check' => [
'99999',
'9-9999',
],
'lowest number not affected by php bug 70588' => [
'100000',
'100000',
],
];
}