addProvider(new Person($faker)); $faker->addProvider(new Internet($faker)); $this->faker = $faker; } public function testEmailIsValid() { $email = $this->faker->email(); $this->assertNotFalse(filter_var($email, FILTER_VALIDATE_EMAIL)); $this->assertNotEmpty($email); $this->assertInternalType('string', $email); } }