• internal This class is not covered by the backward compatibility promise for PHPUnit
CloneableInstantiableIterable
ImplementsCountable
IteratorAggregate
PHPUnit\Framework\SelfDescribing
PHPUnit\Framework\Test
Traversable
Methods
public __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
    name.

  • 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 addTest(PHPUnit\Framework\Test $test, $groups = []) : void
 
Adds a test to the suite.

    public 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 addTestFiles(iterable $fileNames) : void
     
    Wrapper for addTestFile() that adds multiple test files.

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

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

    public getGroupDetails() : array
    public getGroups() : array
     
    Returns the test groups of the suite.

    public getIterator() : Iterator
     
    Returns an iterator for this test suite.

    public getName() : string
     
    Returns the name of the suite.

    public injectFilter(PHPUnit\Runner\Filter\Factory $filter) : void
    public markTestSuiteSkipped( $message = '') : void
     
    Mark the test suite as skipped.

    • throws SkippedTestSuiteError
    public 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 setBackupGlobals( $backupGlobals) : void
     


      public setBackupStaticAttributes( $backupStaticAttributes) : void
       


        public setBeStrictAboutChangesToGlobalState( $beStrictAboutChangesToGlobalState) : void
         


          public setGroupDetails(array $groups) : void
           
          Set tests groups of the test case

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

            public testAt(int $index)
             
            Returns the test at the given index.

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

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

            Properties
            protected $backupGlobals
             
            Enable or disable the backup and restoration of the $GLOBALS array.

            • var bool
            protected $backupStaticAttributes
             
            Enable or disable the backup and restoration of static attributes.

            • var bool
            protected $foundClasses
             


            • var string[]
            protected $groups
             
            The test groups of the test suite.

            • var array
            protected $name
             
            The name of the test suite.

            • var string
            protected $numTests
             
            The number of tests in the test suite.

            • var int
            protected $runTestInSeparateProcess
             


            • var bool
            protected $testCase
             


            • var bool
            protected $tests
             
            The tests in the test suite.

            • var Test[]
            Methods
            protected addTestMethod(ReflectionClass $class, ReflectionMethod $method) : void
             


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

            Properties
            private $beStrictAboutChangesToGlobalState
             


            • var bool
            private $cachedNumTests
             
            Last count of tests in this suite.

            • var null|int
            private $declaredClasses
             


            • var string[]
            private $iteratorFilter
             


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