Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Feature/Jobs/Domain/CreateTest.php
Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | public function testHandle(): void | ||||
$domainNamespace = TestCase::getObjectProperty($job, 'domainNamespace'); | $domainNamespace = TestCase::getObjectProperty($job, 'domainNamespace'); | ||||
return $domainId === $domain->id && | return $domainId === $domain->id && | ||||
$domainNamespace === $domain->namespace; | $domainNamespace === $domain->namespace; | ||||
} | } | ||||
); | ); | ||||
// Test job releasing on unknown identifier | // Test job releasing on unknown identifier | ||||
$this->expectException(\Exception::class); | |||||
$job = new \App\Jobs\Domain\CreateJob(123); | $job = new \App\Jobs\Domain\CreateJob(123); | ||||
$job->handle(); | $job->handle(); | ||||
$this->assertTrue($job->isReleased()); | $this->assertTrue($job->isReleased()); | ||||
$this->assertFalse($job->hasFailed()); | $this->assertFalse($job->hasFailed()); | ||||
} | } | ||||
} | } |