Ejemplo n.º 1
0
 public function testGenerate()
 {
     $data = new \stdClass();
     $data->country = "55";
     $data->area = "11";
     $data->number = "26363509";
     $phone = PhoneFactory::generate($data);
     $this->assertEquals("55", $phone->getCountry());
     $this->assertEquals("11", $phone->getArea());
     $this->assertEquals("26363509", $phone->getNumber());
 }
Ejemplo n.º 2
0
 private static function populatePlaceWhenIsAPlaceListOrFullPlace($place)
 {
     if (self::isPlaceListOrFullPlace()) {
         $place->setName(self::$placeJsonObject->name);
         $place->setAverageRating(self::$placeJsonObject->average_rating);
         $place->setReviewCount(self::$placeJsonObject->review_count);
         $place->setAddress(new Address(self::$placeJsonObject->address));
         $place->setPoint(PointFactory::generate(self::$placeJsonObject->point));
         $place->setMainUrl(self::$placeJsonObject->main_url);
         $place->setOtherUrl(self::$placeJsonObject->other_url);
         $place->setIconUrl(self::$placeJsonObject->icon_url);
         $place->setCategory(CategoryFactory::generate(self::$placeJsonObject->category));
         $place->setPhone(PhoneFactory::generate(self::$placeJsonObject->phone));
     }
 }