public function insertPlace(Place $place) { $cn = new Conexao(); $sql = "INSERT INTO places_added (name, description, address, lat, lng, phone, type, site, facebook_page, plus_page, photo) VALUES ('" . $place->getName() . "','" . $place->getDescription() . "','" . $place->getAddress() . "','" . $place->getLat() . "','" . $place->getLng() . "','" . $place->getPhone() . "','" . $place->getType() . "','" . $place->getSite() . "','" . $place->getFacebookPage() . "','" . $place->getPlusPage() . "','" . $place->getPhoto() . "')"; $result = $cn->execute($sql); $id = $cn->returnInsertedId(); $cn->disconnect(); if ($result != false) { return true; } else { return false; } }
public function testSetGetName() { $this->object->setName("Chegamos!"); $this->assertEquals("Chegamos!", $this->object->getName()); }