mirror of
https://github.com/flarum/framework.git
synced 2025-04-13 19:50:15 +08: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:
parent
915a428973
commit
f45a1608df
@ -11,6 +11,7 @@ namespace Flarum\Tests\integration;
|
||||
|
||||
use Flarum\Extend\ExtenderInterface;
|
||||
use Flarum\Foundation\InstalledSite;
|
||||
use Flarum\Foundation\Paths;
|
||||
use Illuminate\Database\ConnectionInterface;
|
||||
use Laminas\Diactoros\ServerRequest;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
@ -33,12 +34,12 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
if (is_null($this->app)) {
|
||||
$site = new InstalledSite(
|
||||
[
|
||||
new Paths([
|
||||
'base' => __DIR__.'/tmp',
|
||||
'vendor' => __DIR__.'/../../vendor',
|
||||
'public' => __DIR__.'/tmp/public',
|
||||
'storage' => __DIR__.'/tmp/storage',
|
||||
],
|
||||
]),
|
||||
include __DIR__.'/tmp/config.php'
|
||||
);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user