Ejemplo n.º 1
0
 function disabledtestIsCityStateZip()
 {
     $validCityStateZips = array('Alpharetta, GA  30004', 'O Fallon, IL  62269', 'My Really Long City  , MI  48048', 'My Really Long City  , MI  48048-5404', 'Maplewood, MN 55119-5805', 'New Haven, MI  48048', 'Natick, MA  01760', 'Plano, TX  75093', 'Sterling, VA  20164');
     $invalidCityStateZips = array('12345', 'abdde', 'Test Texas 1223', 'Test, TX 1111', 'PO Box 55403', 'P.O. Box 55403', 'Post Office Box 55403');
     foreach ($validCityStateZips as $key => $value) {
         $this->assertTrue(StringUtility::isCityStateZip($value), sprintf("'%s' should be recognized as a 'City, State, Zip' combination", $value));
     }
     foreach ($invalidCityStateZips as $key => $value) {
         $this->assertFalse(StringUtility::isCityStateZip($value), sprintf("'%s' should not be recognized as a 'City, State, Zip' combination", $value));
     }
 }