PHP Class Contao\CoreBundle\Test\Composer\ScriptHandlerTest

Inheritance: extends PHPUnit_Framework_TestCase
Afficher le fichier Open project: contao/core-bundle

Méthodes publiques

Méthode Description
binDirProvider ( ) : array Provides the bin dir data.
setUp ( )
testGeneratesNoRandomSecretIfFileExists ( ) Tests that no secret is generated if the configuration file exists.
testGeneratesNoRandomSecretIfFileExistsArray ( ) Tests that no secret is generated if at least one of multiple configuration files exists.
testGeneratesNoRandomSecretWithoutFileConfig ( ) Tests that no secret is generated if there is no configuration file.
testGeneratesRandomSecret ( ) Tests generating a random secret.
testGeneratesRandomSecretArray ( ) Tests generating a random secret with an array of configuration files.
testGetBinDir ( array $extra, string $expected ) Tests the getBinDir() method.
testGetVerbosityFlag ( ) Tests the getVerbosityFlag() method.
testGetWebDir ( array $extra, string $expected ) Tests the getWebDir() method.
testInstantiation ( ) Tests the object instantiation.
webDirProvider ( ) : array Provides the web dir data.

Private Methods

Méthode Description
assertRandomSecretDoesNotExist ( ) Asserts that the random secret environment variable is not set.
assertRandomSecretIsValid ( ) Asserts that the random secret environment variable is set and valid.
getComposerEvent ( array $extra = [], string | null $method = null ) : Composer\Script\Event Returns the composer event object.
mockComposer ( Composer\Package\PackageInterface $package ) : Composer\Composer | PHPUnit_Framework_MockObject_MockObject Mocks the Composer object.
mockIO ( string | null $method = null ) : Composer\IO\IOInterface | PHPUnit_Framework_MockObject_MockObject Mocks the IO object.
mockPackage ( array $extras = [] ) : Composer\Package\PackageInterface | PHPUnit_Framework_MockObject_MockObject Mocks the package object.

Method Details

binDirProvider() public méthode

Provides the bin dir data.
public binDirProvider ( ) : array
Résultat array

setUp() public méthode

public setUp ( )

testGeneratesNoRandomSecretIfFileExists() public méthode

Tests that no secret is generated if the configuration file exists.

testGeneratesNoRandomSecretIfFileExistsArray() public méthode

Tests that no secret is generated if at least one of multiple configuration files exists.

testGeneratesNoRandomSecretWithoutFileConfig() public méthode

Tests that no secret is generated if there is no configuration file.

testGeneratesRandomSecret() public méthode

Tests generating a random secret.

testGeneratesRandomSecretArray() public méthode

Tests generating a random secret with an array of configuration files.

testGetBinDir() public méthode

Tests the getBinDir() method.
public testGetBinDir ( array $extra, string $expected )
$extra array
$expected string

testGetVerbosityFlag() public méthode

Tests the getVerbosityFlag() method.

testGetWebDir() public méthode

Tests the getWebDir() method.
public testGetWebDir ( array $extra, string $expected )
$extra array
$expected string

testInstantiation() public méthode

Tests the object instantiation.
public testInstantiation ( )

webDirProvider() public méthode

Provides the web dir data.
public webDirProvider ( ) : array
Résultat array