Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

E.164 phone number generator #753

Merged
merged 1 commit into from
Mar 7, 2016
Merged

Conversation

daleattree
Copy link

Added E.164 support as requested in issue #668

@@ -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);
Copy link
Owner

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

Copy link
Owner

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.

@fzaninotto
Copy link
Owner

You must also update the project's README to mention the new formatter.

@fzaninotto fzaninotto changed the title Issue #668 E.164 phone number generator Feb 23, 2016
daleattree pushed a commit to daleattree/Faker that referenced this pull request Mar 7, 2016
@daleattree
Copy link
Author

Refactored as requested.

On Tue, Feb 23, 2016 at 12:53 PM, Francois Zaninotto <
notifications@github.com> wrote:

You must also update the project's README to mention the new formatter.


Reply to this email directly or view it on GitHub
#753 (comment).

@@ -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`
Copy link
Owner

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

@fzaninotto
Copy link
Owner

Can you please squash your commits?

@daleattree
Copy link
Author

Done.

On Mon, Mar 7, 2016 at 10:48 AM, Francois Zaninotto <
notifications@github.com> wrote:

Can you please squash your commits?


Reply to this email directly or view it on GitHub
#753 (comment).

fzaninotto added a commit that referenced this pull request Mar 7, 2016
E.164 phone number generator
@fzaninotto fzaninotto merged commit 86ec144 into fzaninotto:master Mar 7, 2016
@fzaninotto
Copy link
Owner

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants