Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Feature/Controller/Admin/UsersTest.php
Show All 18 Lines | public function setUp(): void | ||||
$this->deleteTestUser('UsersControllerTest1@userscontroller.com'); | $this->deleteTestUser('UsersControllerTest1@userscontroller.com'); | ||||
$this->deleteTestUser('test@testsearch.com'); | $this->deleteTestUser('test@testsearch.com'); | ||||
$this->deleteTestDomain('testsearch.com'); | $this->deleteTestDomain('testsearch.com'); | ||||
$this->deleteTestGroup('group-test@kolab.org'); | $this->deleteTestGroup('group-test@kolab.org'); | ||||
$jack = $this->getTestUser('jack@kolab.org'); | $jack = $this->getTestUser('jack@kolab.org'); | ||||
$jack->setSetting('external_email', null); | $jack->setSetting('external_email', null); | ||||
\App\SharedFolderAlias::truncate(); | |||||
\App\Payment::query()->delete(); | |||||
} | } | ||||
/** | /** | ||||
* {@inheritDoc} | * {@inheritDoc} | ||||
*/ | */ | ||||
public function tearDown(): void | public function tearDown(): void | ||||
{ | { | ||||
$this->deleteTestUser('UsersControllerTest1@userscontroller.com'); | $this->deleteTestUser('UsersControllerTest1@userscontroller.com'); | ||||
$this->deleteTestUser('test@testsearch.com'); | $this->deleteTestUser('test@testsearch.com'); | ||||
$this->deleteTestDomain('testsearch.com'); | $this->deleteTestDomain('testsearch.com'); | ||||
$jack = $this->getTestUser('jack@kolab.org'); | $jack = $this->getTestUser('jack@kolab.org'); | ||||
$jack->setSetting('external_email', null); | $jack->setSetting('external_email', null); | ||||
\App\SharedFolderAlias::truncate(); | \App\SharedFolderAlias::truncate(); | ||||
\App\Payment::query()->delete(); | |||||
parent::tearDown(); | parent::tearDown(); | ||||
} | } | ||||
/** | /** | ||||
* Test user deleting (DELETE /api/v4/users/<id>) | * Test user deleting (DELETE /api/v4/users/<id>) | ||||
*/ | */ | ||||
public function testDestroy(): void | public function testDestroy(): void | ||||
▲ Show 20 Lines • Show All 181 Lines • ▼ Show 20 Lines | public function testIndex(): void | ||||
$wallet->setSetting('mollie_id', 'cst_nonsense'); | $wallet->setSetting('mollie_id', 'cst_nonsense'); | ||||
\App\Payment::create( | \App\Payment::create( | ||||
[ | [ | ||||
'id' => 'tr_nonsense', | 'id' => 'tr_nonsense', | ||||
'wallet_id' => $wallet->id, | 'wallet_id' => $wallet->id, | ||||
'status' => 'paid', | 'status' => 'paid', | ||||
'amount' => 1337, | 'amount' => 1337, | ||||
'credit_amount' => 1337, | |||||
'description' => 'nonsense transaction for testing', | 'description' => 'nonsense transaction for testing', | ||||
'provider' => 'self', | 'provider' => 'self', | ||||
'type' => 'oneoff', | 'type' => 'oneoff', | ||||
'currency' => 'CHF', | 'currency' => 'CHF', | ||||
'currency_amount' => 1337 | 'currency_amount' => 1337 | ||||
] | ] | ||||
); | ); | ||||
▲ Show 20 Lines • Show All 308 Lines • Show Last 20 Lines |