-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Conversation
@@ -112,6 +112,7 @@ public function testPhoneNumber($locale = null) | |||
$faker = Faker\Factory::create($locale); | |||
|
|||
$this->assertRegExp(static::TEST_STRING_REGEX, $faker->phoneNumber); | |||
$this->assertRegExp(static::TEST_STRING_REGEX, $faker->e164PhoneNumber); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please put this test in a new method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, testing that it's a string is too loose. Please validate that the returned value complies with the expected format.
You must also update the project's README to mention the new formatter. |
Refactored as requested. On Tue, Feb 23, 2016 at 12:53 PM, Francois Zaninotto <
|
@@ -127,6 +127,11 @@ Each of the generator properties (like `name`, `address`, and `lorem`) are calle | |||
paragraphs($nb = 3) // array('Quidem ut sunt et quidem est accusamus aut. Fuga est placeat rerum ut. Enim ex eveniet facere sunt.', 'Aut nam et eum architecto fugit repellendus illo. Qui ex esse veritatis.', 'Possimus omnis aut incidunt sunt. Asperiores incidunt iure sequi cum culpa rem. Rerum exercitationem est rem.') | |||
text($maxNbChars = 200) // 'Fuga totam reiciendis qui architecto fugiat nemo. Consequatur recusandae qui cupiditate eos quod.' | |||
|
|||
### `Faker\Provider\PhoneNumber` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's already documented in Faker\Provider\en_US\PhoneNumber
, document the new method there
Can you please squash your commits? |
Done. On Mon, Mar 7, 2016 at 10:48 AM, Francois Zaninotto <
|
Consolidated commit
E.164 phone number generator
Thanks! |
Added E.164 support as requested in issue #668