mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-02-07 09:50:23 +00:00
2.4 - Faking the Payment Gateway
This commit is contained in:
19
tests/unit/Billing/FakePaymentGatewayTest.php
Normal file
19
tests/unit/Billing/FakePaymentGatewayTest.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
use App\Billing\FakePaymentGateway;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
|
||||
class FakePaymentGatewayTest extends TestCase
|
||||
{
|
||||
/** @test */
|
||||
function charges_with_a_valid_payment_token_are_successful()
|
||||
{
|
||||
$paymentGateway = new FakePaymentGateway;
|
||||
|
||||
$paymentGateway->charge(2500, $paymentGateway->getValidTestToken());
|
||||
|
||||
$this->assertEquals(2500, $paymentGateway->totalCharges());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user