public function setUp() { global $dd; Debug::text('Running setUp(): ', __FILE__, __LINE__, __METHOD__, 10); TTDate::setTimeZone('PST8PDT'); $dd = new DemoData(); $dd->setEnableQuickPunch(FALSE); //Helps prevent duplicate punch IDs and validation failures. $dd->setUserNamePostFix('_' . uniqid(NULL, TRUE)); //Needs to be super random to prevent conflicts and random failing tests. $this->company_id = $dd->createCompany(); Debug::text('Company ID: ' . $this->company_id, __FILE__, __LINE__, __METHOD__, 10); //$dd->createPermissionGroups( $this->company_id, 40 ); //Administrator only. $dd->createCurrency($this->company_id, 10); $dd->createPayStubAccount($this->company_id); $this->createPayStubAccounts(); //$this->createPayStubAccrualAccount(); $dd->createPayStubAccountLink($this->company_id); $this->getPayStubAccountLinkArray(); $dd->createUserWageGroups($this->company_id); $this->user_id = $dd->createUser($this->company_id, 100); $this->createPayPeriodSchedule(); $this->createPayPeriods(); $this->getAllPayPeriods(); $this->absence_policy_id = $dd->createAbsencePolicy($this->company_id, 10); $this->branch_ids[] = $dd->createBranch($this->company_id, 10); $this->branch_ids[] = $dd->createBranch($this->company_id, 20); $this->department_ids[] = $dd->createDepartment($this->company_id, 10); $this->department_ids[] = $dd->createDepartment($this->company_id, 20); $this->assertGreaterThan(0, $this->company_id); $this->assertGreaterThan(0, $this->user_id); return TRUE; }
public function setUp() { global $dd; Debug::text('Running setUp(): ', __FILE__, __LINE__, __METHOD__, 10); $dd = new DemoData(); $dd->setUserNamePostFix(rand(1000, 99999)); $this->company_id = $dd->createCompany(); Debug::text('Company ID: ' . $this->company_id, __FILE__, __LINE__, __METHOD__, 10); $dd->createPermissionGroups($this->company_id); $dd->createCurrency($this->company_id, 10); $dd->createPayStubAccount($this->company_id); $this->createPayStubAccounts(); //$this->createPayStubAccrualAccount(); $dd->createPayStubAccountLink($this->company_id); $this->getPayStubAccountLinkArray(); $dd->createUserWageGroups($this->company_id); $this->user_id = $dd->createUser($this->company_id, 100); $this->createPayPeriodSchedule(); $this->createPayPeriods(); $this->getAllPayPeriods(); $this->branch_ids[] = $dd->createBranch($this->company_id, 10); $this->branch_ids[] = $dd->createBranch($this->company_id, 20); $this->department_ids[] = $dd->createDepartment($this->company_id, 10); $this->department_ids[] = $dd->createDepartment($this->company_id, 20); return TRUE; }
public function setUp() { global $dd; Debug::text('Running setUp(): ', __FILE__, __LINE__, __METHOD__, 10); $dd = new DemoData(); $dd->setEnableQuickPunch(FALSE); //Helps prevent duplicate punch IDs and validation failures. $dd->setUserNamePostFix('_' . uniqid(NULL, TRUE)); //Needs to be super random to prevent conflicts and random failing tests. $this->company_id = $dd->createCompany(); Debug::text('Company ID: ' . $this->company_id, __FILE__, __LINE__, __METHOD__, 10); //$dd->createPermissionGroups( $this->company_id, 40 ); //Administrator only. $this->currency_id = $dd->createCurrency($this->company_id, 10); $dd->createUserWageGroups($this->company_id); $this->user_id = $dd->createUser($this->company_id, 100); $this->branch_ids[] = $dd->createBranch($this->company_id, 10); $this->branch_ids[] = $dd->createBranch($this->company_id, 20); $this->department_ids[] = $dd->createDepartment($this->company_id, 10); $this->department_ids[] = $dd->createDepartment($this->company_id, 20); $this->assertGreaterThan(0, $this->company_id); $this->assertGreaterThan(0, $this->user_id); return TRUE; }