diff --git a/composer.json b/composer.json index f0e4ced3447..d89035cee2a 100644 --- a/composer.json +++ b/composer.json @@ -42,7 +42,7 @@ "sebastian/comparator": "^5.0", "sebastian/diff": "^5.0", "sebastian/environment": "^6.0", - "sebastian/exporter": "^5.0", + "sebastian/exporter": "^5.1", "sebastian/global-state": "^6.0.1", "sebastian/object-enumerator": "^5.0", "sebastian/recursion-context": "^5.0", diff --git a/tests/end-to-end/event/error-handler-can-be-disabled.phpt b/tests/end-to-end/event/error-handler-can-be-disabled.phpt index db177dd7a03..d46ae363e95 100644 --- a/tests/end-to-end/event/error-handler-can-be-disabled.phpt +++ b/tests/end-to-end/event/error-handler-can-be-disabled.phpt @@ -39,12 +39,12 @@ Test Suite Started (PHPUnit\TestFixture\Event\ErrorHandlerCanBeDisabled\FooTest, Test Preparation Started (PHPUnit\TestFixture\Event\ErrorHandlerCanBeDisabled\FooTest::testMethodA) Test Prepared (PHPUnit\TestFixture\Event\ErrorHandlerCanBeDisabled\FooTest::testMethodA) Assertion Succeeded (Constraint: exception of type "Exception", Value: Exception Object #%d ( - 'message' => 'fopen(%s/missing/directory): Failed to open stream: No such file or directory' - 'string' => '' - 'code' => 0 - 'file' => '%s/src/Foo.php' - 'line' => 26 - 'previous' => null + 'message' => 'fopen(%s/missing/directory): Failed to open stream: No such file or directory', + 'string' => '', + 'code' => 0, + 'file' => '%s/src/Foo.php', + 'line' => 26, + 'previous' => null, )) Assertion Succeeded (Constraint: exception message contains 'Failed to open stream', Value: 'fopen(%s/missing/directory): Failed to open stream: No such file or directory') Test Passed (PHPUnit\TestFixture\Event\ErrorHandlerCanBeDisabled\FooTest::testMethodA) diff --git a/tests/end-to-end/event/risky-global-state-modification.phpt b/tests/end-to-end/event/risky-global-state-modification.phpt index 1cc95e4dd94..b996e1c2cc1 100644 --- a/tests/end-to-end/event/risky-global-state-modification.phpt +++ b/tests/end-to-end/event/risky-global-state-modification.phpt @@ -42,7 +42,7 @@ This test modified global state but was not expected to do so --- Global variables before the test +++ Global variables after the test %A -+ 'variable' => 'value' ++ 'variable' => 'value', %A Test Finished (PHPUnit\TestFixture\Event\RiskyBecauseGlobalStateModificationTest::testOne) Test Suite Finished (PHPUnit\TestFixture\Event\RiskyBecauseGlobalStateModificationTest, 1 test) diff --git a/tests/end-to-end/event/risky-with-multiple-reasons.phpt b/tests/end-to-end/event/risky-with-multiple-reasons.phpt index 7759162335a..c16686a47a8 100644 --- a/tests/end-to-end/event/risky-with-multiple-reasons.phpt +++ b/tests/end-to-end/event/risky-with-multiple-reasons.phpt @@ -42,7 +42,7 @@ This test modified global state but was not expected to do so --- Global variables before the test +++ Global variables after the test %A -+ 'variable' => 'value' ++ 'variable' => 'value', %A Test Considered Risky (PHPUnit\TestFixture\Event\RiskyWithMultipleReasonsTest::testOne) This test did not perform any assertions diff --git a/tests/unit/Event/Emitter/DispatchingEmitterTest.php b/tests/unit/Event/Emitter/DispatchingEmitterTest.php index adc5e997659..e3c7c8bebab 100644 --- a/tests/unit/Event/Emitter/DispatchingEmitterTest.php +++ b/tests/unit/Event/Emitter/DispatchingEmitterTest.php @@ -1473,7 +1473,7 @@ public function notify(Test\TestProxyCreated $event): void $this->assertInstanceOf(Test\TestProxyCreated::class, $event); $this->assertSame($className, $event->className()); - $this->assertSame("Array &0 (\n 0 => 'foo'\n)", $event->constructorArguments()); + $this->assertSame("Array &0 [\n 0 => 'foo',\n]", $event->constructorArguments()); } public function testTestTestStubCreatedDispatchesTestDoubleTestStubCreatedEvent(): void diff --git a/tests/unit/Framework/Constraint/Equality/IsEqualCanonicalizingTest.php b/tests/unit/Framework/Constraint/Equality/IsEqualCanonicalizingTest.php index 5cf6a46a4ed..20aff3daaa7 100644 --- a/tests/unit/Framework/Constraint/Equality/IsEqualCanonicalizingTest.php +++ b/tests/unit/Framework/Constraint/Equality/IsEqualCanonicalizingTest.php @@ -27,9 +27,9 @@ public static function provider(): array [ true, <<<'EOT' -is equal to Array &%d ( - 0 => 'value' -) +is equal to Array &%d [ + 0 => 'value', +] EOT, '', '', @@ -40,10 +40,10 @@ public static function provider(): array [ true, <<<'EOT' -is equal to Array &%d ( - 0 => 'value' - 1 => 'another-value' -) +is equal to Array &%d [ + 0 => 'value', + 1 => 'another-value', +] EOT, '', '', @@ -55,7 +55,7 @@ public static function provider(): array true, <<<'EOT' is equal to stdClass Object #%d ( - 'foo' => 'bar' + 'foo' => 'bar', ) EOT, '', @@ -157,9 +157,9 @@ public static function provider(): array [ false, <<<'EOT' -is equal to Array &%d ( - 0 => 'value' -) +is equal to Array &%d [ + 0 => 'value', +] EOT, 'Failed asserting that two arrays are equal.', <<<'EOT' @@ -181,7 +181,7 @@ public static function provider(): array false, <<<'EOT' is equal to stdClass Object #%d ( - 'foo' => 'bar' + 'foo' => 'bar', ) EOT, 'Failed asserting that two objects are equal.', diff --git a/tests/unit/Framework/Constraint/Equality/IsEqualIgnoringCaseTest.php b/tests/unit/Framework/Constraint/Equality/IsEqualIgnoringCaseTest.php index c591dac3953..2338ef926c7 100644 --- a/tests/unit/Framework/Constraint/Equality/IsEqualIgnoringCaseTest.php +++ b/tests/unit/Framework/Constraint/Equality/IsEqualIgnoringCaseTest.php @@ -27,9 +27,9 @@ public static function provider(): array [ true, <<<'EOT' -is equal to Array &%d ( - 0 => 'value' -) +is equal to Array &%d [ + 0 => 'value', +] EOT, '', '', @@ -40,10 +40,10 @@ public static function provider(): array [ true, <<<'EOT' -is equal to Array &%d ( - 0 => 'value' - 1 => 'another-value' -) +is equal to Array &%d [ + 0 => 'value', + 1 => 'another-value', +] EOT, '', '', @@ -55,7 +55,7 @@ public static function provider(): array true, <<<'EOT' is equal to stdClass Object #%d ( - 'foo' => 'bar' + 'foo' => 'bar', ) EOT, '', @@ -157,9 +157,9 @@ public static function provider(): array [ false, <<<'EOT' -is equal to Array &%d ( - 0 => 'value' -) +is equal to Array &%d [ + 0 => 'value', +] EOT, 'Failed asserting that two arrays are equal.', <<<'EOT' diff --git a/tests/unit/Framework/Constraint/Equality/IsEqualTest.php b/tests/unit/Framework/Constraint/Equality/IsEqualTest.php index 7985c112d3f..2fafd58e6f6 100644 --- a/tests/unit/Framework/Constraint/Equality/IsEqualTest.php +++ b/tests/unit/Framework/Constraint/Equality/IsEqualTest.php @@ -27,9 +27,9 @@ public static function provider(): array [ true, <<<'EOT' -is equal to Array &%d ( - 0 => 'value' -) +is equal to Array &%d [ + 0 => 'value', +] EOT, '', '', @@ -41,7 +41,7 @@ public static function provider(): array true, <<<'EOT' is equal to stdClass Object #%d ( - 'foo' => 'bar' + 'foo' => 'bar', ) EOT, '', @@ -143,9 +143,9 @@ public static function provider(): array [ false, <<<'EOT' -is equal to Array &%d ( - 0 => 'value' -) +is equal to Array &%d [ + 0 => 'value', +] EOT, 'Failed asserting that two arrays are equal.', <<<'EOT' @@ -166,10 +166,10 @@ public static function provider(): array [ false, <<<'EOT' -is equal to Array &%d ( - 0 => 'value' - 1 => 'another-value' -) +is equal to Array &%d [ + 0 => 'value', + 1 => 'another-value', +] EOT, 'Failed asserting that two arrays are equal.', <<<'EOT' @@ -193,7 +193,7 @@ public static function provider(): array false, <<<'EOT' is equal to stdClass Object #%d ( - 'foo' => 'bar' + 'foo' => 'bar', ) EOT, 'Failed asserting that two objects are equal.', diff --git a/tests/unit/Framework/Constraint/Equality/IsEqualWithDeltaTest.php b/tests/unit/Framework/Constraint/Equality/IsEqualWithDeltaTest.php index 475eb302cdf..69c56650632 100644 --- a/tests/unit/Framework/Constraint/Equality/IsEqualWithDeltaTest.php +++ b/tests/unit/Framework/Constraint/Equality/IsEqualWithDeltaTest.php @@ -47,9 +47,9 @@ public static function provider(): array [ true, <<<'EOT' -is equal to Array &%d ( - 0 => 1.0 -) with delta <0.000000> +is equal to Array &%d [ + 0 => 1.0, +] with delta <0.000000> EOT, '', '', @@ -61,9 +61,9 @@ public static function provider(): array [ true, <<<'EOT' -is equal to Array &%d ( - 0 => 1.0 -) with delta <0.100000> +is equal to Array &%d [ + 0 => 1.0, +] with delta <0.100000> EOT, '', '', @@ -76,7 +76,7 @@ public static function provider(): array true, <<<'EOT' is equal to stdClass Object #%d ( - 'property' => 1.0 + 'property' => 1.0, ) with delta <0.000000> EOT, '', @@ -90,7 +90,7 @@ public static function provider(): array true, <<<'EOT' is equal to stdClass Object #%d ( - 'property' => 1.0 + 'property' => 1.0, ) with delta <0.100000> EOT, '', @@ -113,9 +113,9 @@ public static function provider(): array [ false, <<<'EOT' -is equal to Array &%d ( - 0 => 1.0 -) with delta <0.000000> +is equal to Array &%d [ + 0 => 1.0, +] with delta <0.000000> EOT, 'Failed asserting that two arrays are equal.', <<<'EOT' @@ -138,7 +138,7 @@ public static function provider(): array false, <<<'EOT' is equal to stdClass Object #%d ( - 'property' => 1.0 + 'property' => 1.0, ) with delta <0.000000> EOT, 'Failed asserting that two objects are equal.', diff --git a/tests/unit/Framework/Constraint/IsIdenticalTest.php b/tests/unit/Framework/Constraint/IsIdenticalTest.php index 860f53e4f79..a77e655ed40 100644 --- a/tests/unit/Framework/Constraint/IsIdenticalTest.php +++ b/tests/unit/Framework/Constraint/IsIdenticalTest.php @@ -58,14 +58,14 @@ public static function provider(): array [ <<<'EOT' -is identical to Array &0 ( - 0 => 1 - 1 => 2 - 2 => 3 - 3 => 4 - 4 => 5 - 5 => 6 -) +is identical to Array &0 [ + 0 => 1, + 1 => 2, + 2 => 3, + 3 => 4, + 4 => 5, + 5 => 6, +] EOT, 'Failed asserting that two arrays are identical.', <<<'EOT' @@ -73,15 +73,15 @@ public static function provider(): array --- Expected +++ Actual @@ @@ - Array &0 ( - 0 => 1 - 1 => 2 -- 2 => 3 -+ 2 => 33 - 3 => 4 - 4 => 5 - 5 => 6 - ) + Array &0 [ + 0 => 1, + 1 => 2, +- 2 => 3, ++ 2 => 33, + 3 => 4, + 4 => 5, + 5 => 6, + ] EOT, [1, 2, 3, 4, 5, 6], @@ -90,17 +90,17 @@ public static function provider(): array [ <<<'EOT' -is identical to Array &0 ( - 0 => Array &1 ( - 'A' => 'B' - ) - 1 => Array &2 ( - 'C' => Array &3 ( - 0 => 'D' - 1 => 'E' - ) - ) -) +is identical to Array &0 [ + 0 => Array &1 [ + 'A' => 'B', + ], + 1 => Array &2 [ + 'C' => Array &3 [ + 0 => 'D', + 1 => 'E', + ], + ], +] EOT, 'Failed asserting that two arrays are identical.', <<<'EOT' @@ -108,20 +108,20 @@ public static function provider(): array --- Expected +++ Actual @@ @@ - Array &0 ( - 0 => Array &1 ( -- 'A' => 'B' -+ 'A' => 'C' - ) - 1 => Array &2 ( - 'C' => Array &3 ( -- 0 => 'D' -+ 0 => 'C' - 1 => 'E' -+ 2 => 'F' - ) - ) - ) + Array &0 [ + 0 => Array &1 [ +- 'A' => 'B', ++ 'A' => 'C', + ], + 1 => Array &2 [ + 'C' => Array &3 [ +- 0 => 'D', ++ 0 => 'C', + 1 => 'E', ++ 2 => 'F', + ], + ], + ] EOT, [ diff --git a/tests/unit/Framework/Constraint/Traversable/TraversableContainsOnlyTest.php b/tests/unit/Framework/Constraint/Traversable/TraversableContainsOnlyTest.php index c45bfdd1494..c6f66a34771 100644 --- a/tests/unit/Framework/Constraint/Traversable/TraversableContainsOnlyTest.php +++ b/tests/unit/Framework/Constraint/Traversable/TraversableContainsOnlyTest.php @@ -43,11 +43,11 @@ public static function provider(): array [ false, <<<'EOT' -Failed asserting that Array &0 ( - 0 => 0 - 1 => '1' - 2 => 2 -) contains only values of type "integer". +Failed asserting that Array &0 [ + 0 => 0, + 1 => '1', + 2 => 2, +] contains only values of type "integer". EOT, 'integer', true,