Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Feature/Console/Wallet/UntilTest.php
- This file was added.
<?php | |||||
namespace Tests\Feature\Console\Wallet; | |||||
use Tests\TestCase; | |||||
class UntilTest extends TestCase | |||||
{ | |||||
/** | |||||
* {@inheritDoc} | |||||
*/ | |||||
public function setUp(): void | |||||
{ | |||||
parent::setUp(); | |||||
$this->deleteTestUser('wallet-charge@kolabnow.com'); | |||||
} | |||||
/** | |||||
* {@inheritDoc} | |||||
*/ | |||||
public function tearDown(): void | |||||
{ | |||||
$this->deleteTestUser('wallet-charge@kolabnow.com'); | |||||
parent::tearDown(); | |||||
} | |||||
/** | |||||
* Test command run for a specified wallet | |||||
*/ | |||||
public function testHandleSingle(): void | |||||
{ | |||||
$user = $this->getTestUser('wallet-charge@kolabnow.com'); | |||||
$wallet = $user->wallets()->first(); | |||||
// Non-existing wallet | |||||
$this->artisan('wallet:until unknown') | |||||
->expectsOutput("Wallet not found") | |||||
->assertExitCode(1); | |||||
// TODO | |||||
$this->artisan('wallet:until ' . $wallet->id) | |||||
->assertExitCode(0); | |||||
$this->markTestIncomplete(); | |||||
} | |||||
} |