Skip to content

Commit

Permalink
Add test for en_AU state abbreviation
Browse files Browse the repository at this point in the history
  • Loading branch information
devbobo authored Dec 12, 2024
1 parent 68f06b2 commit 1de2de6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/Provider/en_AU/AddressTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ public function testState(): void
self::assertMatchesRegularExpression('/[A-Z][a-z]+/', $state);
}

public function testStateAbbr(): void
{
$stateAbbr = $this->faker->stateAbbr();
self::assertNotEmpty($stateAbbr);
self::assertIsString($stateAbbr);
self::assertMatchesRegularExpression('/^[A-Z]{2,3}$/', $stateAbbr);
}

protected function getProviders(): iterable
{
yield new Address($this->faker);
Expand Down

0 comments on commit 1de2de6

Please sign in to comment.