function test_get_region_id_by_region_code() { $country = new WPSC_Country(self::COUNTRY_ID_WITH_REGIONS); // USA $region_id = $country->get_region_id_by_region_code($region_code); // Oregon $this->assertEquals(self::REGION_ID, $region_id); $country = new WPSC_Country(self::COUNTRY_ID_WITHOUT_REGIONS); // UK $region_id = $country->get_region_id_by_region_code($region_code); // Oregon $this->assertEquals('', $region_code); // @TODO - What should we assert here? }
function test_get_region_id_by_region_code() { $country = new WPSC_Country(self::COUNTRY_ID_WITH_REGIONS); // USA $region_id = $country->get_region_id_by_region_code(self::REGION_CODE); // Oregon $this->assertEquals(self::REGION_ID, $region_id); $country = new WPSC_Country(self::COUNTRY_ID_WITHOUT_REGIONS); // UK $region_id = $country->get_region_id_by_region_code(self::REGION_CODE); // Oregon }