Browse Source

bah. 1 more unit test failure/fix (great tests!)

alan bount 11 years ago
parent
commit
d1929dcbf8

+ 1 - 0
Model/Behavior/GeocoderBehavior.php

@@ -155,6 +155,7 @@ class GeocoderBehavior extends ModelBehavior {
 				}
 				}
 				return false;
 				return false;
 			}
 			}
+			return true;
 		}
 		}
 
 
 		// valid lat/lng found
 		// valid lat/lng found

+ 2 - 6
Test/Case/Model/Behavior/GeocoderBehaviorTest.php

@@ -154,10 +154,8 @@ class GeocoderBehaviorTest extends CakeTestCase {
 			'city' => 'Deutschland'
 			'city' => 'Deutschland'
 		);
 		);
 		$res = $this->Comment->save($data);
 		$res = $this->Comment->save($data);
-		//debug($this->Comment->Behaviors->Geocoder->Geocode->error()).BR;
-
+		//debug($this->Comment->Behaviors->Geocoder->Geocode->error());
 		//debug($res);
 		//debug($res);
-
 		//debug($this->Comment->Behaviors->Geocoder->Geocode->debug());
 		//debug($this->Comment->Behaviors->Geocoder->Geocode->debug());
 		$this->assertTrue(!empty($res['Comment']['lat']) && !empty($res['Comment']['lng']));
 		$this->assertTrue(!empty($res['Comment']['lat']) && !empty($res['Comment']['lng']));
 	}
 	}
@@ -173,10 +171,8 @@ class GeocoderBehaviorTest extends CakeTestCase {
 			'city' => 'Deutschland'
 			'city' => 'Deutschland'
 		);
 		);
 		$res = $this->Comment->save($data);
 		$res = $this->Comment->save($data);
-		//debug($this->Comment->Behaviors->Geocoder->Geocode->error()).BR;
-
+		//debug($this->Comment->Behaviors->Geocoder->Geocode->error());
 		//debug($res);
 		//debug($res);
-
 		//debug($this->Comment->Behaviors->Geocoder->Geocode->debug());
 		//debug($this->Comment->Behaviors->Geocoder->Geocode->debug());
 		$this->assertTrue(!isset($res['Comment']['lat']) && !isset($res['Comment']['lng']));
 		$this->assertTrue(!isset($res['Comment']['lat']) && !isset($res['Comment']['lng']));
 	}
 	}