菜谱项目

PersonTest.php 520B

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