菜谱项目

CompanyTest.php 475B

123456789101112131415161718192021222324
  1. <?php
  2. namespace Faker\Test\Provider\it_IT;
  3. use Faker\Generator;
  4. use Faker\Provider\it_IT\Company;
  5. class CompanyTest extends \PHPUnit_Framework_TestCase
  6. {
  7. public function setUp()
  8. {
  9. $faker = new Generator();
  10. $faker->addProvider(new Company($faker));
  11. $this->faker = $faker;
  12. }
  13. public function testIfTaxIdCanReturnData()
  14. {
  15. $vatId = $this->faker->vatId();
  16. $this->assertRegExp('/^IT[0-9]{11}$/', $vatId);
  17. }
  18. }