public function testSimpleInsert() { $R = new Object(array(Object::NAME => 'Test route', Object::DISTANCE => 3.14, Object::LATITUDES => array(47.7, 47.8), Object::LONGITUDES => array(7.8, 7.7))); $I = new Inserter($this->PDO, $R); $I->setAccountID(0); $I->insert(); $data = $this->PDO->query('SELECT * FROM `' . PREFIX . 'route` WHERE `accountid`=0')->fetch(PDO::FETCH_ASSOC); $N = new Object($data); $this->assertEquals(0, $data[Inserter::ACCOUNTID]); $this->assertEquals('Test route', $N->name()); $this->assertTrue($N->hasID()); $this->assertTrue($N->hasPositionData()); $this->assertEquals(47.7, $N->get(Object::MIN_LATITUDE)); }