diff --git a/src/Faker/Provider/de_AT/Company.php b/src/Faker/Provider/de_AT/Company.php new file mode 100644 index 0000000000..015de89a76 --- /dev/null +++ b/src/Faker/Provider/de_AT/Company.php @@ -0,0 +1,13 @@ +generator->parse($format)))); + } + + /** + * @example 'faber' + */ + public function domainWord() + { + $company = $this->generator->format('company'); + $companyElements = explode(' ', $company); + $company = $companyElements[0]; + $company = preg_replace('/\W/u', '', $company); + + return static::toLower(static::toAscii($company)); + } +} diff --git a/test/Faker/Provider/de_AT/InternetTest.php b/test/Faker/Provider/de_AT/InternetTest.php new file mode 100644 index 0000000000..91ce5ca5fb --- /dev/null +++ b/test/Faker/Provider/de_AT/InternetTest.php @@ -0,0 +1,32 @@ +addProvider(new Person($faker)); + $faker->addProvider(new Internet($faker)); + $faker->addProvider(new Company($faker)); + $this->faker = $faker; + } + + public function testEmailIsValid() + { + $email = $this->faker->email(); + $this->assertNotFalse(filter_var($email, FILTER_VALIDATE_EMAIL)); + } +}