You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

LocalizationTest.php 1016B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace Faker\Test\Provider;
  3. use Faker\Factory;
  4. class LocalizationTest extends \PHPUnit_Framework_TestCase
  5. {
  6. public function testLocalizedNameProvidersDoNotThrowErrors()
  7. {
  8. foreach (glob(__DIR__ . '/../../../src/Faker/Provider/*/Person.php') as $localizedPerson) {
  9. preg_match('#/([a-zA-Z_]+)/Person\.php#', $localizedPerson, $matches);
  10. $faker = Factory::create($matches[1]);
  11. $this->assertNotNull($faker->name(), 'Localized Name Provider ' . $matches[1] . ' does not throw errors');
  12. }
  13. }
  14. public function testLocalizedAddressProvidersDoNotThrowErrors()
  15. {
  16. foreach (glob(__DIR__ . '/../../../src/Faker/Provider/*/Address.php') as $localizedAddress) {
  17. preg_match('#/([a-zA-Z_]+)/Address\.php#', $localizedAddress, $matches);
  18. $faker = Factory::create($matches[1]);
  19. $this->assertNotNull($faker->address(), 'Localized Address Provider ' . $matches[1] . ' does not throw errors');
  20. }
  21. }
  22. }