Skip to content

Commit

Permalink
Closes #5524
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Sep 25, 2023
1 parent cf5af61 commit 7d46711
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions ChangeLog-10.4.md
Expand Up @@ -18,6 +18,7 @@ All notable changes of the PHPUnit 10.4 release series are documented in this fi
* [#5505](https://github.com/sebastianbergmann/phpunit/pull/5505): Improve the failure description of `StringContains`-based assertions when the strings are encoded differently
* [#5515](https://github.com/sebastianbergmann/phpunit/issues/5515): The `Test\AssertionSucceeded` and `Test\AssertionFailed` events are always emitted again
* [#5515](https://github.com/sebastianbergmann/phpunit/issues/5515): `--log-events-verbose-text` enables the export of non-scalar values for the `Test\AssertionSucceeded` and `Test\AssertionFailed` events
* [#5524](https://github.com/sebastianbergmann/phpunit/issues/5524): Do not export data passed to test for PHPUnit\Event\Code\TestMethod value object by default
* Exceptions thrown by third-party event subscribers are now reported as test runner warnings
* The name of the top-level test suite that is created when a directory or file path is passed as an argument to the test runner is now `CLI Arguments`
* Simplified the failure description for `assertInstanceOf()` and `assertNotInstanceOf()`
Expand Down
7 changes: 4 additions & 3 deletions src/Event/Value/Test/TestMethodBuilder.php
Expand Up @@ -12,14 +12,15 @@
use function assert;
use function debug_backtrace;
use function is_numeric;
use PHPUnit\Event\Facade as EventFacade;
use PHPUnit\Event\TestData\DataFromDataProvider;
use PHPUnit\Event\TestData\DataFromTestDependency;
use PHPUnit\Event\TestData\MoreThanOneDataSetFromDataProviderException;
use PHPUnit\Event\TestData\TestDataCollection;
use PHPUnit\Framework\TestCase;
use PHPUnit\Metadata\Parser\Registry as MetadataRegistry;
use PHPUnit\Util\Exporter;
use PHPUnit\Util\Reflection;
use SebastianBergmann\Exporter\Exporter;

/**
* @internal This class is not covered by the backward compatibility promise for PHPUnit
Expand Down Expand Up @@ -78,13 +79,13 @@ private static function dataFor(TestCase $testCase): TestDataCollection

$testData[] = DataFromDataProvider::from(
$dataSetName,
(new Exporter)->export($testCase->providedData()),
Exporter::export($testCase->providedData(), EventFacade::emitter()->exportsObjects()),
);
}

if ($testCase->hasDependencyInput()) {
$testData[] = DataFromTestDependency::from(
(new Exporter)->export($testCase->dependencyInput()),
Exporter::export($testCase->dependencyInput(), EventFacade::emitter()->exportsObjects()),
);
}

Expand Down

0 comments on commit 7d46711

Please sign in to comment.