PHP 8.2.30
Preview: UnexpectedOutputPrinter.php Size: 1.05 KB
/home/byroehnu/easetack.com/vendor/phpunit/phpunit/src/TextUI/Output/Default/UnexpectedOutputPrinter.php

<?php declare(strict_types=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\TextUI\Output\Default;

use PHPUnit\Event\EventFacadeIsSealedException;
use PHPUnit\Event\Facade;
use PHPUnit\Event\Test\PrintedUnexpectedOutput;
use PHPUnit\Event\Test\PrintedUnexpectedOutputSubscriber;
use PHPUnit\Event\UnknownSubscriberTypeException;
use PHPUnit\TextUI\Output\Printer;

final readonly class UnexpectedOutputPrinter implements PrintedUnexpectedOutputSubscriber
{
    private Printer $printer;

    /**
     * @throws EventFacadeIsSealedException
     * @throws UnknownSubscriberTypeException
     */
    public function __construct(Printer $printer, Facade $facade)
    {
        $this->printer = $printer;

        $facade->registerSubscriber($this);
    }

    public function notify(PrintedUnexpectedOutput $event): void
    {
        $this->printer->print($event->output());
    }
}

Directory Contents

Dirs: 1 × Files: 2

Name Size Perms Modified Actions
- drwxrwxrwx 2025-05-16 16:14:50
Edit Download
20.89 KB lrw-rw-rw- 2025-04-08 07:59:11
Edit Download
1.05 KB lrw-rw-rw- 2025-04-08 07:59:11
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).