diff --git a/src/Faker/Provider/lv_LV/Address.php b/src/Faker/Provider/lv_LV/Address.php index fc8db5c196..0bddcc53b9 100644 --- a/src/Faker/Provider/lv_LV/Address.php +++ b/src/Faker/Provider/lv_LV/Address.php @@ -12,7 +12,7 @@ class Address extends \Faker\Provider\Address ]; protected static $buildingNumber = ['%#']; - protected static $postcode = ['LV ####']; + protected static $postcode = ['LV-####']; /** * @see https://lv.wikipedia.org/wiki/Suver%C4%93no_valstu_uzskait%C4%ABjums diff --git a/test/Faker/Provider/lv_LV/AddressTest.php b/test/Faker/Provider/lv_LV/AddressTest.php new file mode 100644 index 0000000000..275340516e --- /dev/null +++ b/test/Faker/Provider/lv_LV/AddressTest.php @@ -0,0 +1,25 @@ +faker->postcode(); + self::assertNotEmpty($postcode); + self::assertIsString($postcode); + self::assertMatchesRegularExpression('/LV-\d{4}/', $postcode); + } + + protected function getProviders(): iterable + { + yield new Address($this->faker); + } +}