Exemplo n.º 1
0
 public function testBelongsToWithImmediate()
 {
     $t = new Thing();
     $t->name = "sean";
     $t->save();
     $f = new Foo();
     $f->name = "kate";
     $t->associateWith($f);
     $t1 = new Thing($t->id);
     $t1->retrieve();
     $f1 = new Foo($f->id);
     $f1->retrieve(array('with' => array('thing' => array('join_strategy' => 'Immediate'))));
     $this->assertTrue($t1->equals($f1->thing));
 }