diff --git a/src/Faker/Provider/pt_PT/PhoneNumber.php b/src/Faker/Provider/pt_PT/PhoneNumber.php new file mode 100644 index 00000000..e15f4c9e --- /dev/null +++ b/src/Faker/Provider/pt_PT/PhoneNumber.php @@ -0,0 +1,50 @@ +addProvider(new PhoneNumber($faker)); + $this->faker = $faker; + } + + public function testPhoneNumberReturnsPhoneNumberWithOrWithoutPrefix() + { + $this->assertRegExp('/^(9[1,2,3,6][0-9]{7})|(2[0-9]{8})|(\+351 [2][0-9]{8})|(\+351 9[1,2,3,6][0-9]{7})/', $this->faker->phoneNumber()); + } + public function testMobileNumberReturnsMobileNumberWithOrWithoutPrefix() + { + $this->assertRegExp('/^(9[1,2,3,6][0-9]{7})/', $this->faker->mobileNumber()); + } +}