/** * @requires PHP 5.4 * @dataProvider localeDataProvider */ public function testUsernameIsValid($locale) { $this->loadLocalProviders($locale); $pattern = '/^[A-Za-z0-9._]+$/'; $username = $this->faker->username(); $this->assertRegExp($pattern, $username); }