diff --git a/tests/integration/TestCase.php b/tests/integration/TestCase.php index cdb3fdc9a..687023dbe 100644 --- a/tests/integration/TestCase.php +++ b/tests/integration/TestCase.php @@ -10,6 +10,7 @@ namespace Flarum\Tests\integration; use Dflydev\FigCookies\SetCookie; +use Flarum\Extend\ExtenderInterface; use Flarum\Foundation\InstalledSite; use Illuminate\Database\ConnectionInterface; use Laminas\Diactoros\CallbackStream; @@ -41,13 +42,24 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase include __DIR__.'/tmp/config.php' ); + $site->extendWith($this->extenders); + $this->app = $site->bootApp(); - $this->server = $this->app->getRequestHandler(); } return $this->app; } + /** + * @var ExtenderInterface[] + */ + protected $extenders = []; + + protected function extend(ExtenderInterface $extender) + { + $this->extenders[] = $extender; + } + /** * @var RequestHandlerInterface */