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

Breadcrumb

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

function JunitXmlLogger::testSuiteStarted

File

vendor/phpunit/phpunit/src/Logging/JUnit/JunitXmlLogger.php, line 110

Class

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

Namespace

PHPUnit\Logging\JUnit

Code

public function testSuiteStarted(Started $event) : void {
    $testSuite = $this->document
        ->createElement('testsuite');
    $testSuite->setAttribute('name', $event->testSuite()
        ->name());
    if ($event->testSuite()
        ->isForTestClass()) {
        $testSuite->setAttribute('file', $event->testSuite()
            ->file());
    }
    if ($this->testSuiteLevel > 0) {
        $this->testSuites[$this->testSuiteLevel]
            ->appendChild($testSuite);
    }
    else {
        $this->root
            ->appendChild($testSuite);
    }
    $this->testSuiteLevel++;
    $this->testSuites[$this->testSuiteLevel] = $testSuite;
    $this->testSuiteTests[$this->testSuiteLevel] = 0;
    $this->testSuiteAssertions[$this->testSuiteLevel] = 0;
    $this->testSuiteErrors[$this->testSuiteLevel] = 0;
    $this->testSuiteFailures[$this->testSuiteLevel] = 0;
    $this->testSuiteSkipped[$this->testSuiteLevel] = 0;
    $this->testSuiteTimes[$this->testSuiteLevel] = 0;
}

API Navigation

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