Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: CI Pipeline

on: [ push, workflow_dispatch ]
on:
push:
branches:
- 4.x
workflow_dispatch:

jobs:
php-tests:
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/ErrorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ protected function genericResponse(Throwable $exception): Response
*
* @return int
*/
protected function getStatusCode(Throwable $exception)
protected function getStatusCode(Throwable $exception): float|string|int
{
// By default throw 500
$statusCode = $exception->getCode() ?: 500;
Expand Down
3 changes: 3 additions & 0 deletions tests/ApiResources/OrdersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Igniter\Admin\Models\Status;
use Igniter\Cart\Models\Order;
use Igniter\Local\Models\Location;
use Igniter\PayRegister\Models\Payment;
use Igniter\User\Models\Address;
use Igniter\User\Models\Customer;
use Igniter\User\Models\User;
Expand Down Expand Up @@ -82,6 +83,8 @@
});

it('shows an order with payment_method relationship', function(): void {
Payment::syncAll();

Sanctum::actingAs(User::factory()->create(), ['orders:*']);
$order = Order::factory()->create([
'payment' => 'cod',
Expand Down