PHP Class Consolidation\Cgr\CgrTests

Inheritance: extends PHPUnit_Framework_TestCase
Afficher le fichier Open project: consolidation/cgr

Protected Properties

Свойство Type Description
$application
$tempDir
$workDir

Méthodes publiques

Méthode Description
createFixtures ( )
deleteDirContents ( string $dir ) : boolean Deletes the contents of a directory.
fileDeleteRecursive ( $dir )
setUp ( )
setUpBeforeClass ( )
tearDown ( )
tearDownAfterClass ( )
tempdir ( $baseDir = false, $prefix = '' )
testApplicationCommandStrings ( $argv, $expected ) Unit tests on the application. We parse several sets of arguments, and check to see if the generate appropriate command strings.
testApplicationCommandStringsValues ( )
testApplicationOutput ( $argv, $envArray, $expected ) Functional test using a mocked application: we call a script that echos its arguments and prints the COMPOSER_BIN_DIR environment variable.
testApplicationOutputValues ( )
testApplicationWithComposer ( ) Functional test with the real composer executable. Use cgr to require cgr, although we do so with --no-update to avoid pointlessly downloading files we do not actually need. We therefore only test to see whether the composer.json file is correctly updated; we cannot test to see if the cgr binary is correctly installed in the appropriate bin directory, as this step is not done.
testApplicationWithComposerPassthruCommand ( ) Functional test with the real composer executable. Use cgr to require cgr, although we do so with --no-update to avoid pointlessly downloading files we do not actually need. We therefore only test to see whether the composer.json file is correctly updated; we cannot test to see if the cgr binary is correctly installed in the appropriate bin directory, as this step is not done.
testFixtures ( )

Method Details

createFixtures() public méthode

public createFixtures ( )

deleteDirContents() static public méthode

This is essentially a copy of drush_delete_dir_contents().
See also: drush_delete_dir_contents()
static public deleteDirContents ( string $dir ) : boolean
$dir string The directory to delete.
Résultat boolean FALSE on failure, TRUE if everything was deleted.

fileDeleteRecursive() static public méthode

static public fileDeleteRecursive ( $dir )

setUp() public méthode

public setUp ( )

setUpBeforeClass() static public méthode

static public setUpBeforeClass ( )

tearDown() public méthode

public tearDown ( )

tearDownAfterClass() static public méthode

static public tearDownAfterClass ( )

tempdir() static public méthode

static public tempdir ( $baseDir = false, $prefix = '' )

testApplicationCommandStrings() public méthode

Unit tests on the application. We parse several sets of arguments, and check to see if the generate appropriate command strings.
public testApplicationCommandStrings ( $argv, $expected )

testApplicationCommandStringsValues() public méthode

testApplicationOutput() public méthode

Functional test using a mocked application: we call a script that echos its arguments and prints the COMPOSER_BIN_DIR environment variable.
public testApplicationOutput ( $argv, $envArray, $expected )

testApplicationOutputValues() public méthode

testApplicationWithComposer() public méthode

Functional test with the real composer executable. Use cgr to require cgr, although we do so with --no-update to avoid pointlessly downloading files we do not actually need. We therefore only test to see whether the composer.json file is correctly updated; we cannot test to see if the cgr binary is correctly installed in the appropriate bin directory, as this step is not done.

testApplicationWithComposerPassthruCommand() public méthode

Functional test with the real composer executable. Use cgr to require cgr, although we do so with --no-update to avoid pointlessly downloading files we do not actually need. We therefore only test to see whether the composer.json file is correctly updated; we cannot test to see if the cgr binary is correctly installed in the appropriate bin directory, as this step is not done.

testFixtures() public méthode

public testFixtures ( )

Property Details

$application protected_oe property

protected $application

$tempDir protected_oe static_oe property

protected static $tempDir

$workDir protected_oe property

protected $workDir