Skip to content

Commit 38f0919

Browse files
committed
QA
1 parent d61fd96 commit 38f0919

2 files changed

Lines changed: 22 additions & 2 deletions

File tree

src/Tempest/Framework/Testing/IntegrationTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ protected function setupKernel(): self
158158
root: $this->root,
159159
discoveryLocations: $discoveryLocations,
160160
internalStorage: $this->internalStorage,
161-
longRunning: true,
162161
);
163162

164163
/** @var GenericContainer $container */

tests/Integration/Router/WorkerModeApplicationTest.php

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,14 @@
33
namespace Integration\Router;
44

55
use PHPUnit\Framework\Attributes\Test;
6+
use Tempest\Container\GenericContainer;
7+
use Tempest\Core\FrameworkKernel;
8+
use Tempest\Core\Kernel;
69
use Tempest\Core\KernelEvent;
10+
use Tempest\EventBus\EventBus;
11+
use Tempest\Http\RequestFactory;
12+
use Tempest\Router\ResponseSender;
13+
use Tempest\Router\Router;
714
use Tempest\Router\WorkerModeApplication;
815
use Tests\Tempest\Integration\FrameworkIntegrationTestCase;
916

@@ -14,7 +21,21 @@ public function test_shutdown_and_reset_are_called(): void
1421
{
1522
$this->eventBus->preventEventHandling();
1623

17-
$application = new WorkerModeApplication($this->container);
24+
$container = new GenericContainer();
25+
26+
$container->singleton(EventBus::class, $this->container->get(EventBus::class));
27+
$container->singleton(Router::class, $this->container->get(Router::class));
28+
$container->singleton(RequestFactory::class, $this->container->get(RequestFactory::class));
29+
$container->singleton(ResponseSender::class, $this->container->get(ResponseSender::class));
30+
31+
$container->singleton(Kernel::class, new FrameworkKernel(
32+
root: $this->kernel->root,
33+
discoveryLocations: $this->discoveryLocations,
34+
container: $container,
35+
longRunning: true,
36+
));
37+
38+
$application = new WorkerModeApplication($container);
1839

1940
ob_start();
2041
$application->run();

0 commit comments

Comments
 (0)