UnitTestSuite.php

Same filename in other branches
  1. 9 core/tests/TestSuites/UnitTestSuite.php
  2. 10 core/tests/TestSuites/UnitTestSuite.php
  3. 11.x core/tests/TestSuites/UnitTestSuite.php

Namespace

Drupal\Tests\TestSuites

File

core/tests/TestSuites/UnitTestSuite.php

View source
<?php

namespace Drupal\Tests\TestSuites;

require_once __DIR__ . '/TestSuiteBase.php';

/**
 * Discovers tests for the unit test suite.
 */
class UnitTestSuite extends TestSuiteBase {
    
    /**
     * Factory method which loads up a suite with all unit tests.
     *
     * @return static
     *   The test suite.
     */
    public static function suite() {
        $root = dirname(dirname(dirname(__DIR__)));
        $suite = new static('unit');
        $suite->addTestsBySuiteNamespace($root, 'Unit');
        return $suite;
    }

}

Classes

Title Deprecated Summary
UnitTestSuite Discovers tests for the unit test suite.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.