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

Breadcrumb

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

class AfterLastTestMethodFinished

@psalm-immutable

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

Hierarchy

  • class \PHPUnit\Event\Test\AfterLastTestMethodFinished implements \PHPUnit\Event\Event

Expanded class hierarchy of AfterLastTestMethodFinished

File

vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodFinished.php, line 23

Namespace

PHPUnit\Event\Test
View source
final class AfterLastTestMethodFinished implements Event {
    private readonly Telemetry\Info $telemetryInfo;
    
    /**
     * @psalm-var class-string
     */
    private readonly string $testClassName;
    
    /**
     * @psalm-var list<Code\ClassMethod>
     */
    private readonly array $calledMethods;
    
    /**
     * @psalm-param class-string $testClassName
     */
    public function __construct(Telemetry\Info $telemetryInfo, string $testClassName, Code\ClassMethod ...$calledMethods) {
        $this->telemetryInfo = $telemetryInfo;
        $this->testClassName = $testClassName;
        $this->calledMethods = $calledMethods;
    }
    public function telemetryInfo() : Telemetry\Info {
        return $this->telemetryInfo;
    }
    
    /**
     * @psalm-return class-string
     */
    public function testClassName() : string {
        return $this->testClassName;
    }
    
    /**
     * @psalm-return list<Code\ClassMethod>
     */
    public function calledMethods() : array {
        return $this->calledMethods;
    }
    public function asString() : string {
        $buffer = 'After Last Test Method Finished:';
        foreach ($this->calledMethods as $calledMethod) {
            $buffer .= sprintf(PHP_EOL . '- %s::%s', $calledMethod->className(), $calledMethod->methodName());
        }
        return $buffer;
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
AfterLastTestMethodFinished::$calledMethods private property @psalm-var list&lt;Code\ClassMethod&gt;
AfterLastTestMethodFinished::$telemetryInfo private property
AfterLastTestMethodFinished::$testClassName private property @psalm-var class-string
AfterLastTestMethodFinished::asString public function Overrides Event::asString
AfterLastTestMethodFinished::calledMethods public function @psalm-return list&lt;Code\ClassMethod&gt;
AfterLastTestMethodFinished::telemetryInfo public function Overrides Event::telemetryInfo
AfterLastTestMethodFinished::testClassName public function @psalm-return class-string
AfterLastTestMethodFinished::__construct public function @psalm-param class-string $testClassName

API Navigation

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