public function test_load_fields() { $association = new Jam_Association_Belongsto(array()); $association->initialize($this->meta, 'test_author'); $model = new Model_Test_Post(); $value = $association->load_fields($model, array('id' => 2, 'name' => 'Test')); $this->assertInstanceOf('Jam_Model', $value); $this->assertTrue($value->loaded()); $this->assertEquals(2, $value->id()); $this->assertEquals('Test', $value->name()); }