mirror of
https://github.com/Karaka-Management/oms-HumanResourceTimeRecording.git
synced 2026-02-14 19:58:40 +00:00
fix tests
This commit is contained in:
parent
379247c74a
commit
f931b17a6c
|
|
@ -17,11 +17,9 @@ namespace Modules\HumanResourceTimeRecording\tests\Controller;
|
||||||
use Model\CoreSettings;
|
use Model\CoreSettings;
|
||||||
use Modules\Admin\Models\AccountMapper;
|
use Modules\Admin\Models\AccountMapper;
|
||||||
use Modules\Admin\Models\AccountPermission;
|
use Modules\Admin\Models\AccountPermission;
|
||||||
use Modules\Admin\Models\NullAccount;
|
|
||||||
use Modules\HumanResourceManagement\Models\Employee;
|
use Modules\HumanResourceManagement\Models\Employee;
|
||||||
use Modules\HumanResourceManagement\Models\EmployeeMapper;
|
use Modules\HumanResourceManagement\Models\EmployeeMapper;
|
||||||
use Modules\HumanResourceTimeRecording\Models\ClockingStatus;
|
use Modules\HumanResourceTimeRecording\Models\ClockingStatus;
|
||||||
use Modules\Media\Models\Media;
|
|
||||||
use Modules\Profile\Models\Profile;
|
use Modules\Profile\Models\Profile;
|
||||||
use Modules\Profile\Models\ProfileMapper;
|
use Modules\Profile\Models\ProfileMapper;
|
||||||
use phpOMS\Account\Account;
|
use phpOMS\Account\Account;
|
||||||
|
|
@ -110,12 +108,12 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
||||||
$profile = new Profile();
|
$profile = new Profile();
|
||||||
|
|
||||||
$profile->account = AccountMapper::get()->where('id', 1)->execute();
|
$profile->account = AccountMapper::get()->where('id', 1)->execute();
|
||||||
$profile->birthday = ($date = new \DateTime('now'));
|
$profile->birthday = new \DateTime('now');
|
||||||
|
|
||||||
ProfileMapper::create()->execute($profile);
|
ProfileMapper::create()->execute($profile);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($e = EmployeeMapper::get()->with('profile')->where('profile/account', 1)->execute())->id === 0) {
|
if ((EmployeeMapper::get()->with('profile')->where('profile/account', 1)->execute())->id === 0) {
|
||||||
$employee = new Employee($profile);
|
$employee = new Employee($profile);
|
||||||
EmployeeMapper::create()->execute($employee);
|
EmployeeMapper::create()->execute($employee);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user