mirror of
https://github.com/flarum/core.git
synced 2025-08-04 07:27:39 +02:00
Split up Application and Container
- Stop trying to implement Laravel's Application contract, which has no value for us. - Stop inheriting from the Container, injecting one works equally well and does not clutter up the interfaces. - Inject the Paths collection instead of unwrapping it again, for better encapsulation. This brings us one step closer toward upgrading our Laravel components (#2055), because we no longer need to adopt the changes to the Application contract.
This commit is contained in:
committed by
Alexander Skvortsov
parent
915a428973
commit
f45a1608df
@@ -11,6 +11,7 @@ namespace Flarum\Tests\integration;
|
|||||||
|
|
||||||
use Flarum\Extend\ExtenderInterface;
|
use Flarum\Extend\ExtenderInterface;
|
||||||
use Flarum\Foundation\InstalledSite;
|
use Flarum\Foundation\InstalledSite;
|
||||||
|
use Flarum\Foundation\Paths;
|
||||||
use Illuminate\Database\ConnectionInterface;
|
use Illuminate\Database\ConnectionInterface;
|
||||||
use Laminas\Diactoros\ServerRequest;
|
use Laminas\Diactoros\ServerRequest;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
@@ -33,12 +34,12 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase
|
|||||||
{
|
{
|
||||||
if (is_null($this->app)) {
|
if (is_null($this->app)) {
|
||||||
$site = new InstalledSite(
|
$site = new InstalledSite(
|
||||||
[
|
new Paths([
|
||||||
'base' => __DIR__.'/tmp',
|
'base' => __DIR__.'/tmp',
|
||||||
'vendor' => __DIR__.'/../../vendor',
|
'vendor' => __DIR__.'/../../vendor',
|
||||||
'public' => __DIR__.'/tmp/public',
|
'public' => __DIR__.'/tmp/public',
|
||||||
'storage' => __DIR__.'/tmp/storage',
|
'storage' => __DIR__.'/tmp/storage',
|
||||||
],
|
]),
|
||||||
include __DIR__.'/tmp/config.php'
|
include __DIR__.'/tmp/config.php'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user