Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Feature/Jobs/UserCreateTest.php
<?php | <?php | ||||
namespace Tests\Feature\Jobs; | namespace Tests\Feature\Jobs; | ||||
use App\Jobs\UserCreate; | |||||
use Tests\TestCase; | use Tests\TestCase; | ||||
class UserCreateTest extends TestCase | class UserCreateTest extends TestCase | ||||
{ | { | ||||
/** | /** | ||||
* {@inheritDoc} | * {@inheritDoc} | ||||
*/ | */ | ||||
public function setUp(): void | public function setUp(): void | ||||
Show All 16 Lines | class UserCreateTest extends TestCase | ||||
* @group ldap | * @group ldap | ||||
*/ | */ | ||||
public function testHandle(): void | public function testHandle(): void | ||||
{ | { | ||||
$user = $this->getTestUser('new-job-user@' . \config('app.domain')); | $user = $this->getTestUser('new-job-user@' . \config('app.domain')); | ||||
$this->assertFalse($user->isLdapReady()); | $this->assertFalse($user->isLdapReady()); | ||||
$job = new UserCreate($user); | $job = new \App\Jobs\User\CreateJob($user->id); | ||||
$job->handle(); | $job->handle(); | ||||
$this->assertTrue($user->fresh()->isLdapReady()); | $this->assertTrue($user->fresh()->isLdapReady()); | ||||
} | } | ||||
} | } |