title = 'Name'; $obj->department = new NullDepartment(1); $obj->responsible = 1; $obj->deputy = 1; $obj->unit = 1; ProcessMapper::create()->execute($obj); $objR = ProcessMapper::get()->where('id', $obj->id)->execute(); self::assertGreaterThan(0, $objR->id); self::assertEquals($obj->title, $objR->title); self::assertEquals($obj->responsible, $objR->responsible); self::assertEquals($obj->deputy, $objR->deputy); self::assertEquals($obj->department->id, $objR->department->id); self::assertEquals($obj->unit, $objR->unit); } }