File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727use Tests \Support \Filters \Customfilter ;
2828
2929/**
30+ * @runTestsInSeparateProcesses
31+ *
3032 * @backupGlobals enabled
3133 *
3234 * @internal
Original file line number Diff line number Diff line change @@ -52,13 +52,19 @@ protected function tearDown(): void
5252 $ _SERVER = [];
5353 }
5454
55+ /**
56+ * @runInSeparateProcess
57+ * @preserveGlobalState disabled
58+ *
59+ * @group SeparateProcess
60+ */
5561 public function testPreviousURLUsesSessionFirst (): void
5662 {
5763 $ uri1 = 'http://example.com/one?two ' ;
5864 $ uri2 = 'http://example.com/two?foo ' ;
5965
60- $ _SERVER ['HTTP_REFERER ' ] = $ uri1 ;
61- $ _SESSION [ '_ci_previous_url ' ] = $ uri2 ;
66+ $ _SERVER ['HTTP_REFERER ' ] = $ uri1 ;
67+ session ()-> set ( '_ci_previous_url ' , $ uri2) ;
6268
6369 $ this ->config ->baseURL = 'http://example.com/public ' ;
6470
@@ -80,6 +86,12 @@ private function createRequest(string $uri): void
8086 Factories::injectMock ('config ' , 'App ' , $ this ->config );
8187 }
8288
89+ /**
90+ * @runInSeparateProcess
91+ * @preserveGlobalState disabled
92+ *
93+ * @group SeparateProcess
94+ */
8395 public function testPreviousURLUsesRefererIfNeeded (): void
8496 {
8597 $ uri1 = 'http://example.com/one?two ' ;
Original file line number Diff line number Diff line change @@ -42,12 +42,18 @@ public function testCurrentURL(): void
4242 $ this ->assertSame (current_url (), $ this ->parser ->renderString ($ template ));
4343 }
4444
45+ /**
46+ * @runInSeparateProcess
47+ * @preserveGlobalState disabled
48+ *
49+ * @group SeparateProcess
50+ */
4551 public function testPreviousURL (): void
4652 {
4753 $ template = '{+ previous_url +} ' ;
4854
4955 // Ensure a previous URL exists to work with.
50- $ _SESSION [ '_ci_previous_url ' ] = 'http://example.com/foo ' ;
56+ session ()-> set ( '_ci_previous_url ' , 'http://example.com/foo ' ) ;
5157
5258 $ this ->assertSame (previous_url (), $ this ->parser ->renderString ($ template ));
5359 }
You can’t perform that action at this time.
0 commit comments