You are here

class PHPUnit_Extensions_PhptTestSuite in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/phpunit/src/Extensions/PhptTestSuite.php \PHPUnit_Extensions_PhptTestSuite

Suite for .phpt test cases.

@since Class available since Release 3.1.4

Hierarchy

Expanded class hierarchy of PHPUnit_Extensions_PhptTestSuite

File

vendor/phpunit/phpunit/src/Extensions/PhptTestSuite.php, line 16

View source
class PHPUnit_Extensions_PhptTestSuite extends PHPUnit_Framework_TestSuite {

  /**
   * Constructs a new TestSuite for .phpt test cases.
   *
   * @param  string                      $directory
   * @throws PHPUnit_Framework_Exception
   */
  public function __construct($directory) {
    if (is_string($directory) && is_dir($directory)) {
      $this
        ->setName($directory);
      $facade = new File_Iterator_Facade();
      $files = $facade
        ->getFilesAsArray($directory, '.phpt');
      foreach ($files as $file) {
        $this
          ->addTestFile($file);
      }
    }
    else {
      throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'directory name');
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PHPUnit_Extensions_PhptTestSuite::__construct public function Constructs a new TestSuite for .phpt test cases. Overrides PHPUnit_Framework_TestSuite::__construct
PHPUnit_Framework_TestSuite::$backupGlobals protected property Enable or disable the backup and restoration of the $GLOBALS array.
PHPUnit_Framework_TestSuite::$backupStaticAttributes protected property Enable or disable the backup and restoration of static attributes.
PHPUnit_Framework_TestSuite::$cachedNumTests private property Last count of tests in this suite.
PHPUnit_Framework_TestSuite::$disallowChangesToGlobalState private property
PHPUnit_Framework_TestSuite::$foundClasses protected property
PHPUnit_Framework_TestSuite::$groups protected property The test groups of the test suite.
PHPUnit_Framework_TestSuite::$iteratorFilter private property
PHPUnit_Framework_TestSuite::$name protected property The name of the test suite.
PHPUnit_Framework_TestSuite::$numTests protected property The number of tests in the test suite.
PHPUnit_Framework_TestSuite::$runTestInSeparateProcess protected property
PHPUnit_Framework_TestSuite::$testCase protected property
PHPUnit_Framework_TestSuite::$tests protected property The tests in the test suite.
PHPUnit_Framework_TestSuite::addTest public function Adds a test to the suite.
PHPUnit_Framework_TestSuite::addTestFile public function Wraps both <code>addTest()</code> and <code>addTestSuite</code> as well as the separate import statements for the user's convenience.
PHPUnit_Framework_TestSuite::addTestFiles public function Wrapper for addTestFile() that adds multiple test files.
PHPUnit_Framework_TestSuite::addTestMethod protected function
PHPUnit_Framework_TestSuite::addTestSuite public function Adds the tests from the given class to the suite.
PHPUnit_Framework_TestSuite::count public function Counts the number of test cases that will be run by this test.
PHPUnit_Framework_TestSuite::createResult protected function Creates a default TestResult object.
PHPUnit_Framework_TestSuite::createTest public static function
PHPUnit_Framework_TestSuite::getGroupDetails public function
PHPUnit_Framework_TestSuite::getGroups public function Returns the test groups of the suite.
PHPUnit_Framework_TestSuite::getIterator public function Returns an iterator for this test suite.
PHPUnit_Framework_TestSuite::getName public function Returns the name of the suite.
PHPUnit_Framework_TestSuite::incompleteTest protected static function @since Method available since Release 4.3.0
PHPUnit_Framework_TestSuite::injectFilter public function
PHPUnit_Framework_TestSuite::isTestMethod public static function
PHPUnit_Framework_TestSuite::markTestSuiteSkipped public function Mark the test suite as skipped.
PHPUnit_Framework_TestSuite::run public function Runs the tests and collects their result in a TestResult. Overrides PHPUnit_Framework_Test::run
PHPUnit_Framework_TestSuite::runTest public function Runs a test.
PHPUnit_Framework_TestSuite::setBackupGlobals public function @since Method available since Release 3.3.0
PHPUnit_Framework_TestSuite::setBackupStaticAttributes public function @since Method available since Release 3.4.0
PHPUnit_Framework_TestSuite::setDisallowChangesToGlobalState public function @since Method available since Release 4.6.0
PHPUnit_Framework_TestSuite::setGroupDetails public function Set tests groups of the test case
PHPUnit_Framework_TestSuite::setName public function Sets the name of the suite.
PHPUnit_Framework_TestSuite::setRunTestInSeparateProcess public function @since Method available since Release 3.7.0
PHPUnit_Framework_TestSuite::setTests public function Set tests of the test suite
PHPUnit_Framework_TestSuite::setUp protected function Template Method that is called before the tests of this test suite are run.
PHPUnit_Framework_TestSuite::skipTest protected static function @since Method available since Release 4.3.0
PHPUnit_Framework_TestSuite::tearDown protected function Template Method that is called after the tests of this test suite have finished running.
PHPUnit_Framework_TestSuite::testAt public function Returns the test at the given index.
PHPUnit_Framework_TestSuite::tests public function Returns the tests as an enumeration.
PHPUnit_Framework_TestSuite::toString public function Returns a string representation of the test suite. Overrides PHPUnit_Framework_SelfDescribing::toString
PHPUnit_Framework_TestSuite::warning protected static function