fix tests

This commit is contained in:
Dennis Eichhorn 2023-09-27 21:42:23 +00:00
parent f931b17a6c
commit 1238b8ff09

View File

@ -104,7 +104,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
*/ */
public function testApiSessionCR() : void public function testApiSessionCR() : void
{ {
if (($profile = ProfileMapper::get()->where('account', 1)->execute())->id === 0) { if (($profile = ProfileMapper::get()->where('account', 1)->limit(1)->execute())->id === 0) {
$profile = new Profile(); $profile = new Profile();
$profile->account = AccountMapper::get()->where('id', 1)->execute(); $profile->account = AccountMapper::get()->where('id', 1)->execute();
@ -113,7 +113,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
ProfileMapper::create()->execute($profile); ProfileMapper::create()->execute($profile);
} }
if ((EmployeeMapper::get()->with('profile')->where('profile/account', 1)->execute())->id === 0) { if ((EmployeeMapper::get()->with('profile')->where('profile/account', 1)->limit(1)->execute())->id === 0) {
$employee = new Employee($profile); $employee = new Employee($profile);
EmployeeMapper::create()->execute($employee); EmployeeMapper::create()->execute($employee);
} }