You are here

abstract class TestCase in Zircon Profile 8

Same name in this branch
  1. 8 vendor/masterminds/html5/test/HTML5/TestCase.php \Masterminds\HTML5\Tests\TestCase
  2. 8 vendor/behat/mink/driver-testsuite/tests/TestCase.php \Behat\Mink\Tests\Driver\TestCase
  3. 8 vendor/composer/installers/tests/Composer/Installers/Test/TestCase.php \Composer\Installers\Test\TestCase
Same name and namespace in other branches
  1. 8.0 vendor/composer/installers/tests/Composer/Installers/Test/TestCase.php \Composer\Installers\Test\TestCase

Hierarchy

  • class \Composer\Installers\Test\TestCase extends \Composer\Installers\Test\PHPUnit_Framework_TestCase

Expanded class hierarchy of TestCase

1 string reference to 'TestCase'
Util_TestDox_NamePrettifierTest::testCaterForUserDefinedSuffix in vendor/phpunit/phpunit/tests/Util/TestDox/NamePrettifierTest.php
@covers PHPUnit_Util_TestDox_NamePrettifier::prettifyTestClass

File

vendor/composer/installers/tests/Composer/Installers/Test/TestCase.php, line 21

Namespace

Composer\Installers\Test
View source
abstract class TestCase extends \PHPUnit_Framework_TestCase {
  private static $parser;
  protected static function getVersionParser() {
    if (!self::$parser) {
      self::$parser = new VersionParser();
    }
    return self::$parser;
  }
  protected function getVersionConstraint($operator, $version) {
    return new VersionConstraint($operator, self::getVersionParser()
      ->normalize($version));
  }
  protected function getPackage($name, $version) {
    $normVersion = self::getVersionParser()
      ->normalize($version);
    return new Package($name, $normVersion, $version);
  }
  protected function getAliasPackage($package, $version) {
    $normVersion = self::getVersionParser()
      ->normalize($version);
    return new AliasPackage($package, $normVersion, $version);
  }
  protected function ensureDirectoryExistsAndClear($directory) {
    $fs = new Filesystem();
    if (is_dir($directory)) {
      $fs
        ->removeDirectory($directory);
    }
    mkdir($directory, 0777, true);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
TestCase::$parser private static property
TestCase::ensureDirectoryExistsAndClear protected function
TestCase::getAliasPackage protected function
TestCase::getPackage protected function
TestCase::getVersionConstraint protected function
TestCase::getVersionParser protected static function