PHP Class Contao\CoreBundle\Test\Composer\ScriptHandlerTest

Inheritance: extends PHPUnit_Framework_TestCase
Datei anzeigen Open project: contao/core-bundle

Public Methods

Method 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

Method 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 method

Provides the bin dir data.
public binDirProvider ( ) : array
return array

setUp() public method

public setUp ( )

testGeneratesNoRandomSecretIfFileExists() public method

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

testGeneratesNoRandomSecretIfFileExistsArray() public method

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

testGeneratesNoRandomSecretWithoutFileConfig() public method

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

testGeneratesRandomSecret() public method

Tests generating a random secret.

testGeneratesRandomSecretArray() public method

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

testGetBinDir() public method

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

testGetVerbosityFlag() public method

Tests the getVerbosityFlag() method.

testGetWebDir() public method

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

testInstantiation() public method

Tests the object instantiation.
public testInstantiation ( )

webDirProvider() public method

Provides the web dir data.
public webDirProvider ( ) : array
return array