/** * @param array $params * * @return Job */ public static function createEntityWithRandomData(array $params = array()) { $params = static::createNewRelations($params); $withId = true; $entityId = bin2hex(substr(uniqid(), 1)); // define here another variables extract($params); $entity = new Job(); // here set another variables if (isset($organization)) { $entity->setOrganization($organization); } if ($withId) { $entity->setId($entityId); } return $entity; }
/** * @testdox Allows setting the name of a company without organization * @covers Jobs\Entity\Job::setApplyId * @covers Jobs\Entity\Job::getApplyId */ public function testGetDefaultForApplyId() { $input = "1234"; $this->target->setId($input); $this->assertEquals($this->target->getApplyId(), $input); }