-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dennis Eichhorn
committed
Sep 25, 2023
1 parent
442cc71
commit e0f9878
Showing
2 changed files
with
7 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,6 @@ | |
|
||
use Model\CoreSettings; | ||
use Modules\Admin\Models\AccountPermission; | ||
use Modules\Profile\Models\ContactType; | ||
use Modules\Profile\Models\Profile; | ||
use Modules\Profile\Models\ProfileMapper; | ||
use phpOMS\Account\Account; | ||
|
@@ -100,34 +99,19 @@ protected function setUp() : void | |
*/ | ||
public function testApiProfileCreate() : void | ||
{ | ||
\Modules\Admin\tests\Helper::createAccounts(1); | ||
|
||
$response = new HttpResponse(); | ||
$request = new HttpRequest(new HttpUri('')); | ||
|
||
$request->header->account = 1; | ||
$request->setData('iaccount-idlist', '1'); | ||
$request->setData('iaccount-idlist', '2'); | ||
|
||
$this->module->apiProfileCreate($request, $response); | ||
|
||
self::assertGreaterThan(0, $response->get('')['response'][0]->id); | ||
} | ||
|
||
/** | ||
* @covers Modules\Profile\Controller\ApiController | ||
* @group module | ||
*/ | ||
public function testApiProfileCreateDbEntry() : void | ||
{ | ||
$request = new HttpRequest(new HttpUri('')); | ||
|
||
$request->header->account = 1; | ||
|
||
$profile = new Profile(new \Modules\Admin\Models\Account()); | ||
$profile->account->login = 'ProfileCreateDb'; | ||
$profile->account->setEmail('[email protected]'); | ||
|
||
self::assertTrue($this->module->apiProfileCreateDbEntry($profile, $request)); | ||
} | ||
|
||
/** | ||
* @covers Modules\Profile\Controller\ApiController | ||
* @group module | ||
|