123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- namespace Faker\Test\Provider\fr_CH;
- use Faker\Generator;
- use Faker\Provider\fr_CH\Person;
- use Faker\Provider\fr_CH\Internet;
- use Faker\Provider\fr_CH\Company;
- class InternetTest extends \PHPUnit_Framework_TestCase
- {
- /**
- * @var Faker\Generator
- */
- private $faker;
- public function setUp()
- {
- $faker = new Generator();
- $faker->addProvider(new Person($faker));
- $faker->addProvider(new Internet($faker));
- $faker->addProvider(new Company($faker));
- $this->faker = $faker;
- }
- /**
- * @test
- */
- public function emailIsValid()
- {
- $email = $this->faker->email();
- $this->assertNotFalse(filter_var($email, FILTER_VALIDATE_EMAIL));
- }
- }
|