code = '123'; $costobject->l11n = new BaseStringL11n(); $costobject->l11n->name = 'Test CostObject'; $costobject->l11n->content = 'Test description'; $id = CostObjectMapper::create()->execute($costobject); self::assertGreaterThan(0, $costobject->id); self::assertEquals($id, $costobject->id); $costobjectR = CostObjectMapper::get()->with('l11n')->where('l11n/language', ISO639x1Enum::_EN)->where('id', $costobject->id)->execute(); self::assertEquals($costobject->code, $costobjectR->code); self::assertEquals($costobject->l11n->content, $costobjectR->l11n); } }