diff --git a/tests/unit/Framework/Exception/ExceptionTest.php b/tests/unit/Framework/Exception/ExceptionTest.php index 64ae6cb616b..d38e7444af5 100644 --- a/tests/unit/Framework/Exception/ExceptionTest.php +++ b/tests/unit/Framework/Exception/ExceptionTest.php @@ -13,16 +13,13 @@ class ExceptionTest extends TestCase { public function testExceptionSleep(): void { - $exception = new Exception(); + $actual = (new Exception)->__sleep(); - $expectedArray = [ - 'serializableTrace', - 'message', - 'code', - 'file', - 'line', - ]; - - $this->assertSame($expectedArray, $exception->__sleep()); + $this->assertCount(5, $actual); + $this->assertContains('serializableTrace', $actual); + $this->assertContains('message', $actual); + $this->assertContains('code', $actual); + $this->assertContains('file', $actual); + $this->assertContains('line', $actual); } }