Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Feature/UserTest.php
Show First 20 Lines • Show All 275 Lines • ▼ Show 20 Lines | public function testDelete(): void | ||||
$this->assertTrue($userB->fresh()->trashed()); | $this->assertTrue($userB->fresh()->trashed()); | ||||
$this->assertTrue($domain->fresh()->trashed()); | $this->assertTrue($domain->fresh()->trashed()); | ||||
$this->assertFalse($userA->isDeleted()); | $this->assertFalse($userA->isDeleted()); | ||||
$this->assertFalse($userB->isDeleted()); | $this->assertFalse($userB->isDeleted()); | ||||
$this->assertFalse($domain->isDeleted()); | $this->assertFalse($domain->isDeleted()); | ||||
} | } | ||||
/** | /** | ||||
* Tests for User::aliasExists() | |||||
*/ | |||||
public function testAliasExists(): void | |||||
{ | |||||
$this->assertTrue(User::aliasExists('jack.daniels@kolab.org')); | |||||
$this->assertFalse(User::aliasExists('j.daniels@kolab.org')); | |||||
$this->assertFalse(User::aliasExists('john@kolab.org')); | |||||
} | |||||
/** | |||||
* Tests for User::emailExists() | * Tests for User::emailExists() | ||||
*/ | */ | ||||
public function testEmailExists(): void | public function testEmailExists(): void | ||||
{ | { | ||||
$this->markTestIncomplete(); | $this->assertFalse(User::emailExists('jack.daniels@kolab.org')); | ||||
$this->assertFalse(User::emailExists('j.daniels@kolab.org')); | |||||
$this->assertTrue(User::emailExists('john@kolab.org')); | |||||
$user = User::emailExists('john@kolab.org', true); | |||||
$this->assertSame('john@kolab.org', $user->email); | |||||
} | } | ||||
/** | /** | ||||
* Tests for User::findByEmail() | * Tests for User::findByEmail() | ||||
*/ | */ | ||||
public function testFindByEmail(): void | public function testFindByEmail(): void | ||||
{ | { | ||||
$user = $this->getTestUser('john@kolab.org'); | $user = $this->getTestUser('john@kolab.org'); | ||||
▲ Show 20 Lines • Show All 258 Lines • Show Last 20 Lines |