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
19 changes: 17 additions & 2 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [ "7.4", "8.0", "8.1", "8.2", "8.3" ]
laravel: [ "7.0", "8.0", "9.0", "10.0", "11.0" ]
php: [ "7.4", "8.0", "8.1", "8.2", "8.3", "8.4" ]
laravel: [ "7.0", "8.0", "9.0", "10.0", "11.0", "12.0" ]
exclude:
- laravel: "7.0"
php: "8.1"
Expand All @@ -21,12 +21,18 @@ jobs:
- laravel: "7.0"
php: "8.3"

- laravel: "7.0"
php: "8.4"

- laravel: "9.0"
php: "7.4"

- laravel: "9.0"
php: "8.3"

- laravel: "9.0"
php: "8.4"

- laravel: "10.0"
php: "7.4"

Expand All @@ -42,6 +48,15 @@ jobs:
- laravel: "11.0"
php: "8.1"

- laravel: "12.0"
php: "7.4"

- laravel: "12.0"
php: "8.0"

- laravel: "12.0"
php: "8.1"

name: PHP ${{ matrix.php }}, Laravel ${{ matrix.laravel }}

steps:
Expand Down
9 changes: 4 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,11 @@
"require": {
"php": "^7.4 || ^8.0",
"fig/http-message-util": "^1.1",
"illuminate/routing": "^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0"
"illuminate/routing": "^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0"
},
"require-dev": {
"dragon-code/extended-routes": "^3.2 || ^4.0",
"orchestra/testbench": "^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0",
"phpunit/phpunit": "^9.6 || ^10.0"
"orchestra/testbench": "^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0",
"phpunit/phpunit": "^9.6 || ^10.0 || ^11.0 || ^12.0"
},
"minimum-stability": "stable",
"prefer-stable": true,
Expand Down Expand Up @@ -71,4 +70,4 @@
]
}
}
}
}
5 changes: 0 additions & 5 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
<include>
<directory suffix=".php">./src</directory>
</include>
<report>
<clover outputFile="build/logs/clover.xml" />
<html outputDirectory="build/logs/coverage" />
<text outputFile="build/logs/coverage.txt" />
</report>
</coverage>
<testsuites>
<testsuite name="Test Suite">
Expand Down
18 changes: 0 additions & 18 deletions src/Application.php

This file was deleted.

3 changes: 0 additions & 3 deletions tests/Concerns/Routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Illuminate\Routing\Router;
use Tests\Http\Controllers\ApiResourceController;
use Tests\Http\Controllers\Controller;
use Tests\Http\Controllers\RestorableResourceController;
use Tests\Http\Controllers\WebResourceController;

trait Routes
Expand Down Expand Up @@ -109,8 +108,6 @@ protected function resourceRoutes(Router $router): void
$router->resource('resources/photos', WebResourceController::class);

$router->apiResource('resources/comments', ApiResourceController::class);

$router->apiRestorableResource('resources/pages', RestorableResourceController::class);
}

protected function protectedRoutes(Router $router): void
Expand Down
12 changes: 0 additions & 12 deletions tests/Http/Controllers/RestorableResourceController.php

This file was deleted.

12 changes: 0 additions & 12 deletions tests/Routes/ResourcesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
namespace Tests\Routes;

use Tests\Http\Controllers\ApiResourceController;
use Tests\Http\Controllers\RestorableResourceController;
use Tests\Http\Controllers\WebResourceController;
use Tests\TestCase;

Expand All @@ -30,15 +29,4 @@ public function testApi(): void
$this->assertSame('api.resources.comments.update', $this->getRouteName('update', ApiResourceController::class));
$this->assertSame('api.resources.comments.destroy', $this->getRouteName('destroy', ApiResourceController::class));
}

public function testRestorableApi(): void
{
$this->assertSame('api.resources.pages.index', $this->getRouteName('index', RestorableResourceController::class));
$this->assertSame('api.resources.pages.store', $this->getRouteName('store', RestorableResourceController::class));
$this->assertSame('api.resources.pages.trashed', $this->getRouteName('trashed', RestorableResourceController::class));
$this->assertSame('api.resources.pages.show', $this->getRouteName('show', RestorableResourceController::class));
$this->assertSame('api.resources.pages.update', $this->getRouteName('update', RestorableResourceController::class));
$this->assertSame('api.resources.pages.destroy', $this->getRouteName('destroy', RestorableResourceController::class));
$this->assertSame('api.resources.pages.restore', $this->getRouteName('restore', RestorableResourceController::class));
}
}
22 changes: 7 additions & 15 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/*
* This file is part of the "dragon-code/support" project.
*
Expand All @@ -16,13 +17,11 @@

namespace Tests;

use DragonCode\ExtendedRoutes\ServiceProvider as ExtendedRoutesServiceProvider;
use DragonCode\LaravelRouteNames\Application;
use DragonCode\LaravelRouteNames\Providers\RoutingServiceProvider;
use DragonCode\LaravelRouteNames\ServiceProvider;
use Illuminate\Foundation\Bootstrap\LoadConfiguration;
use Illuminate\Events\EventServiceProvider;
use Illuminate\Log\LogServiceProvider;
use Illuminate\Support\Facades\Route as RouteFacade;
use Orchestra\Testbench\Bootstrap\LoadConfiguration as OrchestraLoadConfiguration;
use Orchestra\Testbench\Foundation\PackageManifest;
use Orchestra\Testbench\TestCase as BaseTestCase;
use Tests\Concerns\Routes;
use Tests\Http\Controllers\Controller;
Expand All @@ -34,20 +33,13 @@ abstract class TestCase extends BaseTestCase
protected function getPackageProviders($app): array
{
return [
ExtendedRoutesServiceProvider::class,
EventServiceProvider::class,
LogServiceProvider::class,
RoutingServiceProvider::class,
ServiceProvider::class,
];
}

protected function resolveApplication()
{
return tap(new Application($this->getBasePath()), function ($app) {
$app->bind(LoadConfiguration::class, OrchestraLoadConfiguration::class);

PackageManifest::swap($app, $this);
});
}

protected function defineRoutes($router)
{
$router
Expand Down