prepare for data import in demo

This commit is contained in:
Dennis Eichhorn 2020-07-11 20:26:50 +02:00
parent 9153b89a78
commit 9f7f0152ca

View File

@ -25,7 +25,7 @@ use Modules\Profile\Models\ProfileMapper;
*/ */
class EmployeeMapperTest extends \PHPUnit\Framework\TestCase class EmployeeMapperTest extends \PHPUnit\Framework\TestCase
{ {
public function testCRUD() : void public function testCR() : void
{ {
if (($profile = ProfileMapper::getFor(1, 'account'))->getId() === 0) { if (($profile = ProfileMapper::getFor(1, 'account'))->getId() === 0) {
$profile = new Profile(); $profile = new Profile();
@ -36,7 +36,7 @@ class EmployeeMapperTest extends \PHPUnit\Framework\TestCase
$id = ProfileMapper::create($profile); $id = ProfileMapper::create($profile);
} }
$employee = new Employee(ProfileMapper::getFor(1, 'account')); $employee = new Employee($profile);
$id = EmployeeMapper::create($employee); $id = EmployeeMapper::create($employee);
self::assertGreaterThan(0, $employee->getId()); self::assertGreaterThan(0, $employee->getId());