Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

27 rindas
1016B

  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. }