diff --git a/.psalm/baseline.xml b/.psalm/baseline.xml
index 9ea69e8c463..0191587d3f0 100644
--- a/.psalm/baseline.xml
+++ b/.psalm/baseline.xml
@@ -66,8 +66,7 @@
-
- dispatch
+
dispatch
dispatch
dispatch
@@ -295,11 +294,6 @@
PartialMockCreatedSubscriber
-
-
- ProphecyCreatedSubscriber
-
-
TestProxyCreatedSubscriber
diff --git a/src/Event/DispatchingEmitter.php b/src/Event/DispatchingEmitter.php
index 523e5fbf8ce..f109996cb01 100644
--- a/src/Event/DispatchingEmitter.php
+++ b/src/Event/DispatchingEmitter.php
@@ -196,11 +196,6 @@ public function testDoublePartialMockCreated(): void
$this->dispatcher->dispatch(new TestDouble\PartialMockCreated($this->telemetryInfo()));
}
- public function testDoubleProphecyCreated(): void
- {
- $this->dispatcher->dispatch(new TestDouble\ProphecyCreated($this->telemetryInfo()));
- }
-
public function testDoubleTestProxyCreated(): void
{
$this->dispatcher->dispatch(new TestDouble\TestProxyCreated($this->telemetryInfo()));
diff --git a/src/Event/Emitter.php b/src/Event/Emitter.php
index 4552bb263ee..f9c4a09bfdc 100644
--- a/src/Event/Emitter.php
+++ b/src/Event/Emitter.php
@@ -71,8 +71,6 @@ public function testDoubleMockForTraitCreated(): void;
public function testDoublePartialMockCreated(): void;
- public function testDoubleProphecyCreated(): void;
-
public function testDoubleTestProxyCreated(): void;
public function testSuiteAfterClassFinished(): void;
diff --git a/src/Event/Registry.php b/src/Event/Registry.php
index 5e412e04f1c..d326c4ae1fa 100644
--- a/src/Event/Registry.php
+++ b/src/Event/Registry.php
@@ -78,7 +78,6 @@ private static function registerDefaultTypes(): void
TestDouble\MockCreated::class,
TestDouble\MockForTraitCreated::class,
TestDouble\PartialMockCreated::class,
- TestDouble\ProphecyCreated::class,
TestDouble\TestProxyCreated::class,
Test\RunConfigured::class,
Test\RunErrored::class,
diff --git a/src/Event/TestDouble/ProphecyCreated.php b/src/Event/TestDouble/ProphecyCreated.php
deleted file mode 100644
index 471dddde1c0..00000000000
--- a/src/Event/TestDouble/ProphecyCreated.php
+++ /dev/null
@@ -1,31 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-namespace PHPUnit\Event\TestDouble;
-
-use PHPUnit\Event\Event;
-use PHPUnit\Event\Telemetry;
-
-final class ProphecyCreated implements Event
-{
- /**
- * @var Telemetry\Info
- */
- private $telemetryInfo;
-
- public function __construct(Telemetry\Info $telemetryInfo)
- {
- $this->telemetryInfo = $telemetryInfo;
- }
-
- public function telemetryInfo(): Telemetry\Info
- {
- return $this->telemetryInfo;
- }
-}
diff --git a/src/Event/TestDouble/ProphecyCreatedSubscriber.php b/src/Event/TestDouble/ProphecyCreatedSubscriber.php
deleted file mode 100644
index 0215fbf57b9..00000000000
--- a/src/Event/TestDouble/ProphecyCreatedSubscriber.php
+++ /dev/null
@@ -1,17 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-namespace PHPUnit\Event\TestDouble;
-
-use PHPUnit\Event\Subscriber;
-
-interface ProphecyCreatedSubscriber extends Subscriber
-{
- public function notify(ProphecyCreated $event): void;
-}
diff --git a/src/Framework/TestCase.php b/src/Framework/TestCase.php
index 534a494c1de..f551e43256b 100644
--- a/src/Framework/TestCase.php
+++ b/src/Framework/TestCase.php
@@ -1961,11 +1961,7 @@ protected function prophesize(?string $classOrInterface = null): ObjectProphecy
$this->recordDoubledType($classOrInterface);
}
- $prophecy = $this->getProphet()->prophesize($classOrInterface);
-
- Event\Registry::emitter()->testDoubleProphecyCreated();
-
- return $prophecy;
+ return $this->getProphet()->prophesize($classOrInterface);
}
/**
diff --git a/tests/_files/NullEmitter.php b/tests/_files/NullEmitter.php
index c8bc2ba15e2..c74d8849c9f 100644
--- a/tests/_files/NullEmitter.php
+++ b/tests/_files/NullEmitter.php
@@ -129,10 +129,6 @@ public function testDoublePartialMockCreated(): void
{
}
- public function testDoubleProphecyCreated(): void
- {
- }
-
public function testDoubleTestProxyCreated(): void
{
}
diff --git a/tests/unit/Event/DispatchingEmitterTest.php b/tests/unit/Event/DispatchingEmitterTest.php
index a191b5a3787..78e09e8728e 100644
--- a/tests/unit/Event/DispatchingEmitterTest.php
+++ b/tests/unit/Event/DispatchingEmitterTest.php
@@ -769,31 +769,6 @@ public function testTestDoublePartialMockCreatedDispatchesTestDoublePartialMockC
$emitter->testDoublePartialMockCreated();
}
- public function testTestDoubleProphecyCreatedDispatchesTestDoubleProphecyCreatedEvent(): void
- {
- $subscriber = $this->createMock(TestDouble\ProphecyCreatedSubscriber::class);
-
- $subscriber
- ->expects($this->once())
- ->method('notify')
- ->with($this->isInstanceOf(TestDouble\ProphecyCreated::class));
-
- $dispatcher = self::createDispatcherWithRegisteredSubscriber(
- TestDouble\ProphecyCreatedSubscriber::class,
- TestDouble\ProphecyCreated::class,
- $subscriber
- );
-
- $telemetrySystem = self::createTelemetrySystem();
-
- $emitter = new DispatchingEmitter(
- $dispatcher,
- $telemetrySystem
- );
-
- $emitter->testDoubleProphecyCreated();
- }
-
public function testTestDoubleTestProxyCreatedDispatchesTestDoubleTestProxyCreatedEvent(): void
{
$subscriber = $this->createMock(TestDouble\TestProxyCreatedSubscriber::class);
diff --git a/tests/unit/Event/TestDouble/ProphecyCreatedTest.php b/tests/unit/Event/TestDouble/ProphecyCreatedTest.php
deleted file mode 100644
index a778f32ee2f..00000000000
--- a/tests/unit/Event/TestDouble/ProphecyCreatedTest.php
+++ /dev/null
@@ -1,27 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-namespace PHPUnit\Event\TestDouble;
-
-use PHPUnit\Event\AbstractEventTestCase;
-
-/**
- * @covers \PHPUnit\Event\TestDouble\ProphecyCreated
- */
-final class ProphecyCreatedTest extends AbstractEventTestCase
-{
- public function testConstructorSetsValues(): void
- {
- $telemetryInfo = self::createTelemetryInfo();
-
- $event = new ProphecyCreated($telemetryInfo);
-
- self::assertSame($telemetryInfo, $event->telemetryInfo());
- }
-}