File tree Expand file tree Collapse file tree 8 files changed +14
-7
lines changed
Expand file tree Collapse file tree 8 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,7 @@ public function loadEnv(): self
105105 public function registerKernel (): self
106106 {
107107 $ this ->container ->singleton (Kernel::class, $ this );
108+ $ this ->container ->singleton (self ::class, $ this );
108109
109110 return $ this ;
110111 }
Original file line number Diff line number Diff line change @@ -28,7 +28,6 @@ interface Kernel
2828
2929 public string $ internalStorage {
3030 get;
31- set;
3231 }
3332
3433 public array $ discoveryLocations {
Original file line number Diff line number Diff line change @@ -126,8 +126,8 @@ public function test_regular_object_is_wrapped(): void
126126 {
127127 $ object = new class () {
128128 public $ foo = 'bar ' ;
129+
129130 public $ baz = 42 ;
130- private $ hidden = 'secret ' ; // @phpstan-ignore-line not used on purpose
131131 };
132132
133133 $ this ->assertEquals ([$ object ], to_array ($ object ));
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ private function parseDom(string $template): NodeList
127127 );
128128
129129 // If we have head nodes and a head tag, we inject them back
130- if ($ headElement = $ dom ->getElementsByTagName ('head ' )->item (0 )) {
130+ if (( $ headElement = $ dom ->getElementsByTagName ('head ' )->item (0 )) !== null ) {
131131 foreach ($ headNodes as $ headNode ) {
132132 $ headElement ->appendChild ($ dom ->importNode ($ headNode , deep: true ));
133133 }
Original file line number Diff line number Diff line change 99final class JsonController
1010{
1111 #[Post('/json-endpoint ' )]
12- public function __invoke (Request $ request )
12+ public function __invoke (Request $ request ): \ Tempest \ Router \ Responses \ Ok
1313 {
1414 return new Ok ($ request ->get ('title ' ));
1515 }
Original file line number Diff line number Diff line change 1010use Tempest \Auth \Install \CreateUsersTable ;
1111use Tempest \Auth \Install \User ;
1212use Tempest \Clock \Clock ;
13+ use Tempest \Core \FrameworkKernel ;
1314use Tempest \Core \Kernel ;
1415use Tempest \Database \Migrations \CreateMigrationsTable ;
1516use Tempest \Filesystem \LocalFilesystem ;
2728final class AuthorizerTest extends FrameworkIntegrationTestCase
2829{
2930 private string $ path = __DIR__ . '/Fixtures/tmp ' ;
31+
3032 private LocalFilesystem $ filesystem ;
3133
3234 protected function setUp (): void
@@ -45,7 +47,7 @@ protected function setUp(): void
4547 $ this ->filesystem ->deleteDirectory ($ this ->path , recursive: true );
4648 $ this ->filesystem ->ensureDirectoryExists ($ this ->path );
4749
48- $ this ->container ->get (Kernel ::class)->internalStorage = realpath ($ this ->path );
50+ $ this ->container ->get (FrameworkKernel ::class)->internalStorage = realpath ($ this ->path );
4951
5052 $ this ->container ->config (new SessionConfig (path: 'sessions ' ));
5153 $ this ->container ->singleton (
Original file line number Diff line number Diff line change 1212use Tempest \Auth \Install \User ;
1313use Tempest \Auth \SessionAuthenticator ;
1414use Tempest \Clock \Clock ;
15+ use Tempest \Core \FrameworkKernel ;
1516use Tempest \Core \Kernel ;
1617use Tempest \Database \Migrations \CreateMigrationsTable ;
1718use Tempest \Filesystem \LocalFilesystem ;
2728final class SessionAuthenticatorTest extends FrameworkIntegrationTestCase
2829{
2930 private string $ path = __DIR__ . '/Fixtures/tmp ' ;
31+
3032 private LocalFilesystem $ filesystem ;
3133
3234 protected function setUp (): void
@@ -38,7 +40,7 @@ protected function setUp(): void
3840 $ this ->filesystem ->deleteDirectory ($ this ->path , recursive: true );
3941 $ this ->filesystem ->ensureDirectoryExists ($ this ->path );
4042
41- $ this ->container ->get (Kernel ::class)->internalStorage = realpath ($ this ->path );
43+ $ this ->container ->get (FrameworkKernel ::class)->internalStorage = realpath ($ this ->path );
4244
4345 $ this ->container ->config (new SessionConfig (path: 'sessions ' ));
4446 $ this ->container ->singleton (
Original file line number Diff line number Diff line change 55namespace Tests \Tempest \Integration \Http ;
66
77use Tempest \Clock \Clock ;
8+ use Tempest \Core \FrameworkKernel ;
89use Tempest \Core \Kernel ;
910use Tempest \Filesystem \LocalFilesystem ;
1011use Tempest \Router \Session \Managers \FileSessionManager ;
2223final class FileSessionTest extends FrameworkIntegrationTestCase
2324{
2425 private string $ path = __DIR__ . '/Fixtures/tmp ' ;
26+
2527 private LocalFilesystem $ filesystem ;
2628
2729 protected function setUp (): void
@@ -31,9 +33,10 @@ protected function setUp(): void
3133 $ this ->filesystem = new LocalFilesystem ();
3234 $ this ->filesystem ->deleteDirectory ($ this ->path , recursive: true );
3335 $ this ->filesystem ->ensureDirectoryExists ($ this ->path );
36+
3437 $ this ->path = realpath ($ this ->path );
3538
36- $ this ->container ->get (Kernel ::class)->internalStorage = realpath ($ this ->path );
39+ $ this ->container ->get (FrameworkKernel ::class)->internalStorage = realpath ($ this ->path );
3740
3841 $ this ->container ->config (new SessionConfig (path: 'sessions ' ));
3942 $ this ->container ->singleton (
You can’t perform that action at this time.
0 commit comments