diff --git a/.psalm/baseline.xml b/.psalm/baseline.xml index d901218c611..dc0388009ad 100644 --- a/.psalm/baseline.xml +++ b/.psalm/baseline.xml @@ -9,8 +9,7 @@ - - dispatch + dispatch dispatch dispatch diff --git a/src/Event/DispatchingEmitter.php b/src/Event/DispatchingEmitter.php index 4eec9e7a7c4..25c4d9aff95 100644 --- a/src/Event/DispatchingEmitter.php +++ b/src/Event/DispatchingEmitter.php @@ -190,11 +190,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 84441f060e5..45302b0c1de 100644 --- a/src/Event/Registry.php +++ b/src/Event/Registry.php @@ -88,7 +88,6 @@ private static function registerDefaultTypes(): void TestDouble\MockCreated::class, TestDouble\MockForTraitCreated::class, TestDouble\PartialMockCreated::class, - TestDouble\ProphecyCreated::class, TestDouble\TestProxyCreated::class, TestSuite\AfterClassFinished::class, TestSuite\BeforeClassFinished::class, diff --git a/src/Event/TestDouble/ProphecyCreated.php b/src/Event/TestDouble/ProphecyCreated.php deleted file mode 100644 index 46c824e44a2..00000000000 --- a/src/Event/TestDouble/ProphecyCreated.php +++ /dev/null @@ -1,28 +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 -{ - private Telemetry\Info $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/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 58f279f498f..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); - - $this->assertSame($telemetryInfo, $event->telemetryInfo()); - } -}