public function testAssociateBelongsTo() { $thing = $this->testInsert(false); $bar = new Bar(); $bar->bar_name = "sammy"; $bar->associateWith($thing); $bar->save(); $t = new Thing($thing->id); $t->retrieve(array('with' => 'bar')); $this->assertEquals($bar->bar_name, $t->bar->bar_name); $this->assertEquals($bar->thing_id, $t->bar->thing_id); }