/** * @param string $value */ private function __construct($value) { Guard::true(empty($value) || ISO3166::isValid($value), 'Customer country must have ISO 3166-1 alpha-2 standard.'); $this->value = $value; }
/** * @test */ public function itShouldBeValidISO3166Country() { $this->assertTrue(ISO3166::isValid('NL')); $this->assertFalse(ISO3166::isValid('NLD')); }