ComposerInstallersTestTestCase

The Simple Calendar Composer Installers Test TestCase class.

Defined (1)

The class is defined in the following location(s).

/vendor/composer/installers/tests/Composer/Installers/Test/TestCase.php  
  1. abstract class TestCase extends \PHPUnit_Framework_TestCase 
  2. private static $parser; 
  3.  
  4. protected static function getVersionParser() 
  5. if (!self::$parser) { 
  6. self::$parser = new VersionParser(); 
  7.  
  8. return self::$parser; 
  9.  
  10. protected function getVersionConstraint($operator, $version) 
  11. return new VersionConstraint( 
  12. $operator,  
  13. self::getVersionParser()->normalize($version) 
  14. ); 
  15.  
  16. protected function getPackage($name, $version) 
  17. $normVersion = self::getVersionParser()->normalize($version); 
  18.  
  19. return new Package($name, $normVersion, $version); 
  20.  
  21. protected function getAliasPackage($package, $version) 
  22. $normVersion = self::getVersionParser()->normalize($version); 
  23.  
  24. return new AliasPackage($package, $normVersion, $version); 
  25.  
  26. protected function ensureDirectoryExistsAndClear($directory) 
  27. $fs = new Filesystem(); 
  28. if (is_dir($directory)) { 
  29. $fs->removeDirectory($directory); 
  30. mkdir($directory, 0777, true);