TraversableContainsIdentical example

UpdateSubscriber::getSubscribedEvents()
        );
    }

    public function testUpdateSucessfull(): void
    {
        $context = Context::createDefaultContext();
        $version = '6.0.1_test';

        $notificationServiceMock = $this->createMock(NotificationService::class);
        $notificationServiceMock->expects(static::once())->method('createNotification')->with(
            new TraversableContainsIdentical('Updated successfully to version ' . $version)
        );

        $eventMock = $this->createMock(UpdatePostFinishEvent::class);
        $eventMock->expects(static::any())->method('getContext')->willReturn($context);
        $eventMock->expects(static::any())->method('getNewVersion')->willReturn($version);

        $updateSubscriber = new UpdateSubscriber($notificationServiceMock);

        $updateSubscriber->updateFinishedDone($eventMock);
    }

    
Home | Imprint | This part of the site doesn't use cookies.