菜谱项目

PaymentTest.php 623B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace Faker\Test\Provider\nl_BE;
  3. use Faker\Generator;
  4. use Faker\Provider\nl_BE\Payment;
  5. class PaymentTest 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 Payment($faker));
  15. $this->faker = $faker;
  16. }
  17. public function testVatIsValid()
  18. {
  19. $vat = $this->faker->vat();
  20. $unspacedVat = $this->faker->vat(false);
  21. $this->assertRegExp('/^(BE 0\d{9})$/', $vat);
  22. $this->assertRegExp('/^(BE0\d{9})$/', $unspacedVat);
  23. }
  24. }