Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
repl6669 committed Oct 12, 2023
1 parent 9660599 commit 605efbd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
11 changes: 9 additions & 2 deletions tests/CreatePaymentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@

use Dystcz\LunarApi\Domain\Carts\Events\CartCreated;
use Dystcz\LunarApi\Domain\Carts\Models\Cart;
use Dystcz\LunarApiStripeAdapter\Tests\TestCase;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\URL;
use Lunar\Facades\CartSession;

uses(TestCase::class, RefreshDatabase::class);

beforeEach(function () {
/** @var TestCase $this */
Event::fake(CartCreated::class);

/** @var Cart $cart */
Expand All @@ -22,8 +27,10 @@
});

test('a payment intent can be created', function (string $paymentMethod) {
$url = URL::temporarySignedRoute(
'v1.orders.createPaymentIntent', now()->addDays(28), ['order' => $this->order->id]
/** @var TestCase $this */
$url = URL::signedRoute(
'v1.orders.createPaymentIntent',
['order' => $this->order->id],
);

$response = $this
Expand Down
5 changes: 0 additions & 5 deletions tests/Pest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
<?php

use Dystcz\LunarApiStripeAdapter\Tests\TestCase;
use Illuminate\Foundation\Testing\RefreshDatabase;

uses(TestCase::class, RefreshDatabase::class)->in(__DIR__);

0 comments on commit 605efbd

Please sign in to comment.