Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Feature/Jobs/PaymentEmailTest.php
<?php | <?php | ||||
namespace Tests\Feature\Jobs; | namespace Tests\Feature\Jobs; | ||||
use App\Jobs\PaymentEmail; | use App\Jobs\PaymentEmail; | ||||
use App\Mail\PaymentFailure; | use App\Mail\PaymentFailure; | ||||
use App\Mail\PaymentSuccess; | use App\Mail\PaymentSuccess; | ||||
use App\Payment; | use App\Payment; | ||||
use App\Providers\PaymentProvider; | use App\Providers\PaymentProvider; | ||||
use App\User; | |||||
use Illuminate\Support\Facades\Mail; | use Illuminate\Support\Facades\Mail; | ||||
use Tests\TestCase; | use Tests\TestCase; | ||||
class PaymentEmailTest extends TestCase | class PaymentEmailTest extends TestCase | ||||
{ | { | ||||
/** | /** | ||||
* {@inheritDoc} | * {@inheritDoc} | ||||
* | * | ||||
Show All 20 Lines | class PaymentEmailTest extends TestCase | ||||
/** | /** | ||||
* Test job handle | * Test job handle | ||||
* | * | ||||
* @return void | * @return void | ||||
*/ | */ | ||||
public function testHandle() | public function testHandle() | ||||
{ | { | ||||
$user = $this->getTestUser('PaymentEmail@UserAccount.com'); | $status = User::STATUS_ACTIVE | User::STATUS_LDAP_READY | User::STATUS_IMAP_READY; | ||||
$user = $this->getTestUser('PaymentEmail@UserAccount.com', ['status' => $status]); | |||||
$user->setSetting('external_email', 'ext@email.tld'); | $user->setSetting('external_email', 'ext@email.tld'); | ||||
$wallet = $user->wallets()->first(); | $wallet = $user->wallets()->first(); | ||||
$payment = new Payment(); | $payment = new Payment(); | ||||
$payment->id = 'test-payment'; | $payment->id = 'test-payment'; | ||||
$payment->wallet_id = $wallet->id; | $payment->wallet_id = $wallet->id; | ||||
$payment->amount = 100; | $payment->amount = 100; | ||||
$payment->currency_amount = 100; | $payment->currency_amount = 100; | ||||
▲ Show 20 Lines • Show All 68 Lines • Show Last 20 Lines |