Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Browser/Admin/UserTest.php
Show All 30 Lines | public function setUp(): void | ||||
'external_email' => 'john.doe.external@gmail.com', | 'external_email' => 'john.doe.external@gmail.com', | ||||
]); | ]); | ||||
if ($john->isSuspended()) { | if ($john->isSuspended()) { | ||||
User::where('email', $john->email)->update(['status' => $john->status - User::STATUS_SUSPENDED]); | User::where('email', $john->email)->update(['status' => $john->status - User::STATUS_SUSPENDED]); | ||||
} | } | ||||
$wallet = $john->wallets()->first(); | $wallet = $john->wallets()->first(); | ||||
$wallet->discount()->dissociate(); | $wallet->discount()->dissociate(); | ||||
$wallet->save(); | $wallet->save(); | ||||
$this->clearMeetEntitlements(); | |||||
} | } | ||||
/** | /** | ||||
* {@inheritDoc} | * {@inheritDoc} | ||||
*/ | */ | ||||
public function tearDown(): void | public function tearDown(): void | ||||
{ | { | ||||
$john = $this->getTestUser('john@kolab.org'); | $john = $this->getTestUser('john@kolab.org'); | ||||
$john->setSettings([ | $john->setSettings([ | ||||
'phone' => null, | 'phone' => null, | ||||
'external_email' => 'john.doe.external@gmail.com', | 'external_email' => 'john.doe.external@gmail.com', | ||||
]); | ]); | ||||
if ($john->isSuspended()) { | if ($john->isSuspended()) { | ||||
User::where('email', $john->email)->update(['status' => $john->status - User::STATUS_SUSPENDED]); | User::where('email', $john->email)->update(['status' => $john->status - User::STATUS_SUSPENDED]); | ||||
} | } | ||||
$wallet = $john->wallets()->first(); | $wallet = $john->wallets()->first(); | ||||
$wallet->discount()->dissociate(); | $wallet->discount()->dissociate(); | ||||
$wallet->save(); | $wallet->save(); | ||||
$this->clearMeetEntitlements(); | |||||
parent::tearDown(); | parent::tearDown(); | ||||
} | } | ||||
/** | /** | ||||
* Test user info page (unauthenticated) | * Test user info page (unauthenticated) | ||||
*/ | */ | ||||
public function testUserUnauth(): void | public function testUserUnauth(): void | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 374 Lines • Show Last 20 Lines |