Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Feature/Jobs/DomainVerifyTest.php
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | public function testHandle(): void | ||||
); | ); | ||||
$this->assertFalse($domain->isVerified()); | $this->assertFalse($domain->isVerified()); | ||||
$job = new \App\Jobs\Domain\VerifyJob($domain->id); | $job = new \App\Jobs\Domain\VerifyJob($domain->id); | ||||
$job->handle(); | $job->handle(); | ||||
$this->assertTrue($domain->fresh()->isVerified()); | $this->assertTrue($domain->fresh()->isVerified()); | ||||
// Test non-existing domain ID | |||||
$job = new \App\Jobs\Domain\VerifyJob(123); | |||||
$job->handle(); | |||||
$this->assertTrue($job->hasFailed()); | |||||
$this->assertSame("Domain 123 could not be found in the database.", $job->failureMessage); | |||||
} | } | ||||
/** | /** | ||||
* Test job handle (non-existing domain) | * Test job handle (non-existing domain) | ||||
* | * | ||||
* @group dns | * @group dns | ||||
*/ | */ | ||||
public function testHandleNonExisting(): void | public function testHandleNonExisting(): void | ||||
Show All 17 Lines |