• internal This class is not covered by the backward compatibility promise for PHPUnit
public PHPUnit\Framework\TestSuite::__construct( $theClass = '', string $name = '')
Constructs a new TestSuite:

  • PHPUnit\Framework\TestSuite() constructs an empty TestSuite.

  • PHPUnit\Framework\TestSuite(ReflectionClass) constructs a
    TestSuite from the given class.

  • PHPUnit\Framework\TestSuite(ReflectionClass, String)
    constructs a TestSuite from the given class with the given

  • PHPUnit\Framework\TestSuite(String) either constructs a
    TestSuite from the given class (if the passed string is the
    name of an existing class) or constructs an empty TestSuite
    with the given name.

  • throws Exception
public PHPUnit\Framework\TestSuite::addTest(PHPUnit\Framework\Test $test, $groups = []) : void
Adds a test to the suite.

    public PHPUnit\Framework\TestSuite::addTestFile(string $filename) : void
    Wraps both addTest() and addTestSuite as well as the separate import statements for the user's convenience.

    If the named file cannot be read or there are no new tests that can be
    added, a PHPUnit\Framework\WarningTestCase will be created instead,
    leaving the current test run untouched.

    • throws Exception
    public PHPUnit\Framework\TestSuite::addTestFiles(iterable $fileNames) : void
    Wrapper for addTestFile() that adds multiple test files.

    • throws Exception
    public PHPUnit\Framework\TestSuite::addTestSuite( $testClass) : void
    Adds the tests from the given class to the suite.

    • throws Exception
    public PHPUnit\Framework\TestSuite::count(bool $preferCache = false) : int
    Counts the number of test cases that will be run by this test.

    public getDependencies() : array
    public PHPUnit\Framework\TestSuite::getGroupDetails() : array
    public PHPUnit\Framework\TestSuite::getGroups() : array
    Returns the test groups of the suite.

    public PHPUnit\Framework\TestSuite::getIterator() : Iterator
    Returns an iterator for this test suite.

    public PHPUnit\Framework\TestSuite::getName() : string
    Returns the name of the suite.

    public getSize() : int
    Returns the size of the each test created using the data provider(s)

    • throws SebastianBergmann\RecursionContext\InvalidArgumentException
    public hasDependencies() : bool
    public PHPUnit\Framework\TestSuite::injectFilter(PHPUnit\Runner\Filter\Factory $filter) : void
    public PHPUnit\Framework\TestSuite::markTestSuiteSkipped( $message = '') : void
    Mark the test suite as skipped.

    • throws SkippedTestSuiteError
    public PHPUnit\Framework\TestSuite::run(?PHPUnit\Framework\TestResult $result = NULL) : PHPUnit\Framework\TestResult
    Runs the tests and collects their result in a TestResult.

    • throws PHPUnit\Framework\CodeCoverageException
    • throws SebastianBergmann\CodeCoverage\CoveredCodeNotExecutedException
    • throws SebastianBergmann\CodeCoverage\InvalidArgumentException
    • throws SebastianBergmann\CodeCoverage\MissingCoversAnnotationException
    • throws SebastianBergmann\CodeCoverage\RuntimeException
    • throws SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException
    • throws SebastianBergmann\RecursionContext\InvalidArgumentException
    • throws Warning
    public PHPUnit\Framework\TestSuite::setBackupGlobals( $backupGlobals) : void

      public PHPUnit\Framework\TestSuite::setBackupStaticAttributes( $backupStaticAttributes) : void

        public PHPUnit\Framework\TestSuite::setBeStrictAboutChangesToGlobalState( $beStrictAboutChangesToGlobalState) : void

          public setDependencies(array $dependencies) : void

            public PHPUnit\Framework\TestSuite::setGroupDetails(array $groups) : void
            Set tests groups of the test case

            public PHPUnit\Framework\TestSuite::setName(string $name) : void
            public PHPUnit\Framework\TestSuite::setRunTestInSeparateProcess(bool $runTestInSeparateProcess) : void
            public PHPUnit\Framework\TestSuite::setTests(array $tests) : void
            Set tests of the test suite

              public PHPUnit\Framework\TestSuite::testAt(int $index)
              Returns the test at the given index.

              • return bool|\Test
              public PHPUnit\Framework\TestSuite::tests() : array
              Returns the tests as an enumeration.

              • return Test[]
              public PHPUnit\Framework\TestSuite::toString() : string
              Returns a string representation of the test suite.

              protected PHPUnit\Framework\TestSuite::$backupGlobals
              Enable or disable the backup and restoration of the $GLOBALS array.

              • var bool
              protected PHPUnit\Framework\TestSuite::$backupStaticAttributes
              Enable or disable the backup and restoration of static attributes.

              • var bool
              protected PHPUnit\Framework\TestSuite::$foundClasses

              • var string[]
              protected PHPUnit\Framework\TestSuite::$groups
              The test groups of the test suite.

              • var array
              protected PHPUnit\Framework\TestSuite::$name
              The name of the test suite.

              • var string
              protected PHPUnit\Framework\TestSuite::$numTests
              The number of tests in the test suite.

              • var int
              protected PHPUnit\Framework\TestSuite::$runTestInSeparateProcess

              • var bool
              protected PHPUnit\Framework\TestSuite::$testCase

              • var bool
              protected PHPUnit\Framework\TestSuite::$tests
              The tests in the test suite.

              • var Test[]
              protected PHPUnit\Framework\TestSuite::addTestMethod(ReflectionClass $class, ReflectionMethod $method) : void

              • throws Exception
              protected PHPUnit\Framework\TestSuite::createResult() : PHPUnit\Framework\TestResult
              Creates a default TestResult object.

              private $dependencies

              • var string[]
              © 2020 Bruce Wells
              Search Namespaces \ Classes
              ConfigurationNumbers (0-9.) only