/
githubmirror
/
framework
Обзор
Документация
Войти
/
githubmirror
/
framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
13.x
tests/Integration/Foundation/FoundationServiceProvidersTest.php
46 строк
943 B
Mior Muhammad Zaki
[10.x] Test Improvements (#48797)
24 окт 2023, 16:37
Не верифицирован
24 окт 2023, 16:37
6350194
Код
Авторство
О чём код?
<?php namespace Illuminate\Tests\Integration\Foundation; use Illuminate\Support\ServiceProvider; use Orchestra\Testbench\TestCase; class FoundationServiceProvidersTest extends TestCase { protected function getPackageProviders($app) { return [HeadServiceProvider::class]; } public function testItCanBootServiceProviderRegisteredFromAnotherServiceProvider() { $this->assertTrue($this->app['tail.registered']); $this->assertTrue($this->app['tail.booted']); } } class HeadServiceProvider extends ServiceProvider { public function register() { // } public function boot() { $this->app->register(TailServiceProvider::class); } } class TailServiceProvider extends ServiceProvider { public function register() { $this->app['tail.registered'] = true; } public function boot() { $this->app['tail.booted'] = true; } }