Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Feature/Console/UsersTest.php
- This file was copied from src/tests/Feature/Console/DomainsTest.php.
<?php | <?php | ||||
namespace Tests\Feature\Console\Domain; | namespace Tests\Feature\Console; | ||||
use Tests\TestCase; | use Tests\TestCase; | ||||
class DomainsTest extends TestCase | class UsersTest extends TestCase | ||||
{ | { | ||||
/** | /** | ||||
* Test the command | * Test the command | ||||
*/ | */ | ||||
public function testHandle(): void | public function testHandle(): void | ||||
{ | { | ||||
$domain = \App\Domain::where('namespace', 'kolab.org')->first(); | $john = $this->getTestUser('john@kolab.org'); | ||||
// Existing domain | // Existing domain | ||||
$code = \Artisan::call("domains"); | $code = \Artisan::call("users"); | ||||
$output = trim(\Artisan::output()); | $output = trim(\Artisan::output()); | ||||
$this->assertSame(0, $code); | $this->assertSame(0, $code); | ||||
$this->assertTrue(strpos($output, (string) $domain->id) !== false); | $this->assertTrue(strpos($output, (string) $john->id) !== false); | ||||
// TODO: Test --deleted argument | // TODO: Test --deleted argument | ||||
// TODO: Test output format and other attributes | // TODO: Test output format and other attributes | ||||
// TODO: Test tenant context | // TODO: Test tenant context | ||||
$this->markTestIncomplete(); | |||||
} | } | ||||
} | } |