@@ -31,8 +31,6 @@ final class DispatchingEmitter implements Emitter
3131 private readonly Telemetry \System $ system ;
3232 private readonly Telemetry \Snapshot $ startSnapshot ;
3333 private Telemetry \Snapshot $ previousSnapshot ;
34- private bool $ emitAssertionSucceededEvents = false ;
35- private bool $ emitAssertionFailedEvents = false ;
3634
3735 public function __construct (Dispatcher $ dispatcher , Telemetry \System $ system )
3836 {
@@ -43,50 +41,6 @@ public function __construct(Dispatcher $dispatcher, Telemetry\System $system)
4341 $ this ->previousSnapshot = $ system ->snapshot ();
4442 }
4543
46- /**
47- * @todo Remove this method once we found a better way to avoid creating event objects
48- * that are expensive to create when there are no subscribers registered for them
49- *
50- * @see https://github.com/sebastianbergmann/phpunit/issues/5261
51- */
52- public function emitAssertionSucceededEvents (): void
53- {
54- $ this ->emitAssertionSucceededEvents = true ;
55- }
56-
57- /**
58- * @todo Remove this method once we found a better way to avoid creating event objects
59- * that are expensive to create when there are no subscribers registered for them
60- *
61- * @see https://github.com/sebastianbergmann/phpunit/issues/5261
62- */
63- public function emitsAssertionSucceededEvents (): bool
64- {
65- return $ this ->emitAssertionSucceededEvents ;
66- }
67-
68- /**
69- * @todo Remove this method once we found a better way to avoid creating event objects
70- * that are expensive to create when there are no subscribers registered for them
71- *
72- * @see https://github.com/sebastianbergmann/phpunit/issues/5261
73- */
74- public function emitAssertionFailedEvents (): void
75- {
76- $ this ->emitAssertionFailedEvents = true ;
77- }
78-
79- /**
80- * @todo Remove this method once we found a better way to avoid creating event objects
81- * that are expensive to create when there are no subscribers registered for them
82- *
83- * @see https://github.com/sebastianbergmann/phpunit/issues/5261
84- */
85- public function emitsAssertionFailedEvents (): bool
86- {
87- return $ this ->emitAssertionFailedEvents ;
88- }
89-
9044 /**
9145 * @throws InvalidArgumentException
9246 * @throws UnknownEventTypeException
@@ -446,14 +400,10 @@ public function testRegisteredComparator(string $className): void
446400 */
447401 public function testAssertionSucceeded (mixed $ value , Constraint \Constraint $ constraint , string $ message ): void
448402 {
449- if (!$ this ->emitAssertionSucceededEvents ) {
450- return ;
451- }
452-
453403 $ this ->dispatcher ->dispatch (
454404 new Test \AssertionSucceeded (
455405 $ this ->telemetryInfo (),
456- ( new Exporter )-> export ( $ value ) ,
406+ '' ,
457407 $ constraint ->toString (),
458408 $ constraint ->count (),
459409 $ message ,
@@ -467,10 +417,6 @@ public function testAssertionSucceeded(mixed $value, Constraint\Constraint $cons
467417 */
468418 public function testAssertionFailed (mixed $ value , Constraint \Constraint $ constraint , string $ message ): void
469419 {
470- if (!$ this ->emitAssertionFailedEvents ) {
471- return ;
472- }
473-
474420 $ this ->dispatcher ->dispatch (
475421 new Test \AssertionFailed (
476422 $ this ->telemetryInfo (),
0 commit comments