public function testGetAvailableCountries() { $countries = ZipCode::getAvailableCountries(); $this->assertTrue(is_array($countries)); $this->assertContains('FR', $countries); $this->assertContains('US', $countries); }
public function testEmptyValuesByCountry() { foreach (ZipCode::getAvailableCountries() as $country) { foreach ($this->getEmptyValues() as $value) { $this->assertFalse(ZipCode::validate($value, $country), 'Empty value should be invalid.'); } } }
/** * testUSZipCode * * @param mixed $code * @param string $country * @param bool $result * * @dataProvider zipCodes * * @return void */ public function testUSZipCode($code, $country, $result) { $this->assertEquals(ZipCode::validate($code, $country), $result); }