diff --git a/test/Faker/Provider/en_AU/PhoneNumberTest.php b/test/Faker/Provider/en_AU/PhoneNumberTest.php new file mode 100644 index 0000000000..7f43e84c6b --- /dev/null +++ b/test/Faker/Provider/en_AU/PhoneNumberTest.php @@ -0,0 +1,34 @@ +addProvider(new PhoneNumber($faker)); + $this->faker = $faker; + } + + public function testPhoneNumberCanReturnData() + { + $number = $this->faker->phoneNumber; + $this->assertNotEmpty($number); + } + + public function testPhoneNumberFormat() + { + $number = $this->faker->phoneNumber; + $this->assertRegExp('/^(?:\+?61|0)[2-478](?:[ -]?[0-9]){8}$/', $number); + } +}