File tree Expand file tree Collapse file tree 4 files changed +56
-20
lines changed Expand file tree Collapse file tree 4 files changed +56
-20
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,20 @@ final class AutoloaderTest extends CIUnitTestCase
43
43
*/
44
44
private Closure $ classLoader ;
45
45
46
+ public static function setUpBeforeClass (): void
47
+ {
48
+ parent ::setUpBeforeClass ();
49
+
50
+ set_error_handler (null );
51
+ }
52
+
53
+ public static function tearDownAfterClass (): void
54
+ {
55
+ parent ::tearDownAfterClass ();
56
+
57
+ restore_error_handler ();
58
+ }
59
+
46
60
protected function setUp (): void
47
61
{
48
62
parent ::setUp ();
@@ -396,10 +410,6 @@ public function testAutoloaderLoadsNonClassFiles(): void
396
410
#[RunInSeparateProcess]
397
411
public function testLoadHelpers (): void
398
412
{
399
- // Workaround for errors on PHPUnit 10 and PHP 8.3.
400
- // See https://github.com/sebastianbergmann/phpunit/issues/5403#issuecomment-1906810619
401
- restore_error_handler ();
402
-
403
413
$ config = new Autoload ();
404
414
$ config ->helpers [] = 'form ' ;
405
415
Original file line number Diff line number Diff line change @@ -48,15 +48,25 @@ final class CodeIgniterTest extends CIUnitTestCase
48
48
private CodeIgniter $ codeigniter ;
49
49
protected $ routes ;
50
50
51
+ public static function setUpBeforeClass (): void
52
+ {
53
+ parent ::setUpBeforeClass ();
54
+
55
+ set_error_handler (null );
56
+ }
57
+
58
+ public static function tearDownAfterClass (): void
59
+ {
60
+ parent ::tearDownAfterClass ();
61
+
62
+ restore_error_handler ();
63
+ }
64
+
51
65
protected function setUp (): void
52
66
{
53
67
parent ::setUp ();
54
68
$ this ->resetServices ();
55
69
56
- // Workaround for errors on PHPUnit 10 and PHP 8.3.
57
- // See https://github.com/sebastianbergmann/phpunit/issues/5403#issuecomment-1906810619
58
- restore_error_handler ();
59
-
60
70
$ _SERVER ['SERVER_PROTOCOL ' ] = 'HTTP/1.1 ' ;
61
71
62
72
$ this ->codeigniter = new MockCodeIgniter (new App ());
Original file line number Diff line number Diff line change @@ -38,6 +38,20 @@ final class MiscUrlTest extends CIUnitTestCase
38
38
{
39
39
private App $ config ;
40
40
41
+ public static function setUpBeforeClass (): void
42
+ {
43
+ parent ::setUpBeforeClass ();
44
+
45
+ set_error_handler (null );
46
+ }
47
+
48
+ public static function tearDownAfterClass (): void
49
+ {
50
+ parent ::tearDownAfterClass ();
51
+
52
+ restore_error_handler ();
53
+ }
54
+
41
55
protected function setUp (): void
42
56
{
43
57
parent ::setUp ();
@@ -63,10 +77,6 @@ protected function tearDown(): void
63
77
#[RunInSeparateProcess]
64
78
public function testPreviousURLUsesSessionFirst (): void
65
79
{
66
- // Workaround for errors on PHPUnit 10 and PHP 8.3.
67
- // See https://github.com/sebastianbergmann/phpunit/issues/5403#issuecomment-1906810619
68
- restore_error_handler ();
69
-
70
80
$ uri1 = 'http://example.com/one?two ' ;
71
81
$ uri2 = 'http://example.com/two?foo ' ;
72
82
@@ -98,10 +108,6 @@ private function createRequest(string $uri): void
98
108
#[RunInSeparateProcess]
99
109
public function testPreviousURLUsesRefererIfNeeded (): void
100
110
{
101
- // Workaround for errors on PHPUnit 10 and PHP 8.3.
102
- // See https://github.com/sebastianbergmann/phpunit/issues/5403#issuecomment-1906810619
103
- restore_error_handler ();
104
-
105
111
$ uri1 = 'http://example.com/one?two ' ;
106
112
107
113
$ _SERVER ['HTTP_REFERER ' ] = $ uri1 ;
Original file line number Diff line number Diff line change @@ -29,6 +29,20 @@ final class ParserPluginTest extends CIUnitTestCase
29
29
private Parser $ parser ;
30
30
private Validation $ validator ;
31
31
32
+ public static function setUpBeforeClass (): void
33
+ {
34
+ parent ::setUpBeforeClass ();
35
+
36
+ set_error_handler (null );
37
+ }
38
+
39
+ public static function tearDownAfterClass (): void
40
+ {
41
+ parent ::tearDownAfterClass ();
42
+
43
+ restore_error_handler ();
44
+ }
45
+
32
46
protected function setUp (): void
33
47
{
34
48
parent ::setUp ();
@@ -51,10 +65,6 @@ public function testCurrentURL(): void
51
65
#[RunInSeparateProcess]
52
66
public function testPreviousURL (): void
53
67
{
54
- // Workaround for errors on PHPUnit 10 and PHP 8.3.
55
- // See https://github.com/sebastianbergmann/phpunit/issues/5403#issuecomment-1906810619
56
- restore_error_handler ();
57
-
58
68
$ template = '{+ previous_url +} ' ;
59
69
60
70
// Ensure a previous URL exists to work with.
You can’t perform that action at this time.
0 commit comments