Skip to content

Commit d7995f6

Browse files
committed
Unit test fix
1 parent 7a48bcf commit d7995f6

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

tests/HttpFactory/TestCase.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ public static function setUpBeforeClass(): void
3333

3434
public static function tearDownAfterClass(): void
3535
{
36-
\set_error_handler(self::$errorHandler);
36+
if (self::$errorHandler !== null) {
37+
\set_error_handler(self::$errorHandler);
38+
}
3739
}
3840

3941
protected static function assertExceptionOrTypeError($callable)

tests/HttpMessage/TestCase.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,11 @@ public static function setUpBeforeClass(): void
3737
});
3838
}
3939

40-
public static function tearDownAfter(): void
40+
public static function tearDownAfterClass(): void
4141
{
42-
\set_error_handler(self::$errorHandler);
42+
if (self::$errorHandler !== null) {
43+
\set_error_handler(self::$errorHandler);
44+
}
4345
}
4446

4547
protected static function hasParamTypes()

0 commit comments

Comments
 (0)