title = 'Name'; $obj->descriptionRaw = 'Description'; $obj->setDepartment(new NullDepartment(2)); $obj->setResponsible(1); $obj->setDeputy(1); $obj->setUnit(new NullUnit(1)); ProcessMapper::create($obj); $objR = ProcessMapper::get($obj->getId()); self::assertEquals($obj->title, $objR->title); self::assertEquals($obj->descriptionRaw, $objR->descriptionRaw); self::assertEquals($obj->getResponsible(), $objR->getResponsible()); self::assertEquals($obj->getDeputy(), $objR->getDeputy()); self::assertEquals($obj->getDepartment()->getId(), $objR->getDepartment()->getId()); self::assertEquals($obj->getUnit()->getId(), $objR->getUnit()->getId()); } }