PHP Class Elgg\CommitMessageGitHookTest

Inheritance: extends TestCase
Afficher le fichier Open project: elgg/elgg

Protected Properties

Свойство Type Description
$filesDir
$scriptsDir
$validateScript

Méthodes publiques

Méthode Description
setUp ( )
testAcceptsValidFileInput ( )
testAcceptsValidPipeInput ( )
testAcceptsValidStringInput ( )
testRejectsEmptyFileInput ( )
testRejectsEmptyPipeInput ( )
testRejectsEmptyStringInput ( ) Test failures for missing input
testRejectsInvalidFileInput ( )

Méthodes protégées

Méthode Description
runCmd ( string $cmd, string &$output, array $env = [] ) : boolean Executes a command and returns true if the cmd exited with 0.

Method Details

runCmd() protected méthode

Executes a command and returns true if the cmd exited with 0.
protected runCmd ( string $cmd, string &$output, array $env = [] ) : boolean
$cmd string Shell command to execute
$output string Output from stdout and stderr will be written to this variable
$env array Array of environment variables to be passed to sub-process
Résultat boolean Result depending on process exit code.

setUp() public méthode

public setUp ( )

testAcceptsValidFileInput() public méthode

testAcceptsValidPipeInput() public méthode

testAcceptsValidStringInput() public méthode

testRejectsEmptyFileInput() public méthode

testRejectsEmptyPipeInput() public méthode

testRejectsEmptyStringInput() public méthode

Test failures for missing input

testRejectsInvalidFileInput() public méthode

Property Details

$filesDir protected_oe property

protected $filesDir

$scriptsDir protected_oe property

protected $scriptsDir

$validateScript protected_oe property

protected $validateScript