Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PrintedUnexpectedOutput.php

class PrintedUnexpectedOutput

@psalm-immutable

@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit

Hierarchy

  • class \PHPUnit\Event\Test\PrintedUnexpectedOutput implements \PHPUnit\Event\Event

Expanded class hierarchy of PrintedUnexpectedOutput

1 file declares its use of PrintedUnexpectedOutput
UnexpectedOutputPrinter.php in vendor/phpunit/phpunit/src/TextUI/Output/Default/UnexpectedOutputPrinter.php

File

vendor/phpunit/phpunit/src/Event/Events/Test/PrintedUnexpectedOutput.php, line 22

Namespace

PHPUnit\Event\Test
View source
final class PrintedUnexpectedOutput implements Event {
    private readonly Telemetry\Info $telemetryInfo;
    
    /**
     * @psalm-var non-empty-string
     */
    private readonly string $output;
    
    /**
     * @psalm-param non-empty-string $output
     */
    public function __construct(Telemetry\Info $telemetryInfo, string $output) {
        $this->telemetryInfo = $telemetryInfo;
        $this->output = $output;
    }
    public function telemetryInfo() : Telemetry\Info {
        return $this->telemetryInfo;
    }
    
    /**
     * @psalm-return non-empty-string
     */
    public function output() : string {
        return $this->output;
    }
    public function asString() : string {
        return sprintf('Test Printed Unexpected Output%s%s', PHP_EOL, $this->output);
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
PrintedUnexpectedOutput::$output private property @psalm-var non-empty-string
PrintedUnexpectedOutput::$telemetryInfo private property
PrintedUnexpectedOutput::asString public function Overrides Event::asString
PrintedUnexpectedOutput::output public function @psalm-return non-empty-string
PrintedUnexpectedOutput::telemetryInfo public function Overrides Event::telemetryInfo
PrintedUnexpectedOutput::__construct public function @psalm-param non-empty-string $output

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal