菜谱项目

CompanyTest.php 485B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace Faker\Test\Provider\zh_TW;
  3. use Faker\Generator;
  4. use Faker\Provider\zh_TW\Company;
  5. class CompanyTest extends \PHPUnit_Framework_TestCase
  6. {
  7. /**
  8. * @var Generator
  9. */
  10. private $faker;
  11. public function setUp()
  12. {
  13. $faker = new Generator();
  14. $faker->addProvider(new Company($faker));
  15. $this->faker = $faker;
  16. }
  17. public function testVAT()
  18. {
  19. $this->assertEquals(8, floor(log10($this->faker->VAT) + 1));
  20. }
  21. }