PHP 클래스 PHPUnit_TextUI_Command, phpunit

저자: Sebastian Bergmann ([email protected])
파일 보기 프로젝트 열기: sebastianbergmann/phpunit 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$arguments array
$longOptions array
$options array

공개 메소드들

메소드 설명
main ( boolean $exit = true )
run ( array $argv, boolean $exit = true ) : integer

보호된 메소드들

메소드 설명
createRunner ( ) : PHPUnit_TextUI_TestRunner Create a TestRunner, override in subclasses.
handleArguments ( array $argv ) Handles the command-line arguments.
handleBootstrap ( string $filename ) Loads a bootstrap file.
handleCustomTestSuite ( ) Custom callback for test suite discovery.
handleLoader ( string $loaderClass, string $loaderFile = '' ) : PHPUnit_Runner_TestSuiteLoader Handles the loading of the PHPUnit_Runner_TestSuiteLoader implementation.
handlePrinter ( string $printerClass, string $printerFile = '' ) : PHPUnit_Util_Printer Handles the loading of the PHPUnit_Util_Printer implementation.
handleVersionCheck ( )
showHelp ( ) Show the help message.

비공개 메소드들

메소드 설명
handleExtensions ( string $directory )
printVersionString ( )
showError ( $message )

메소드 상세

createRunner() 보호된 메소드

Create a TestRunner, override in subclasses.
protected createRunner ( ) : PHPUnit_TextUI_TestRunner
리턴 PHPUnit_TextUI_TestRunner

handleArguments() 보호된 메소드

A child class of PHPUnit_TextUI_Command can hook into the argument parsing by adding the switch(es) to the $longOptions array and point to a callback method that handles the switch(es) in the child class like this longOptions['my-switch'] = 'myHandler'; my-secondswitch will accept a value - note the equals sign $this->longOptions['my-secondswitch='] = 'myOtherHandler'; } --my-switch -> myHandler() protected function myHandler() { } --my-secondswitch foo -> myOtherHandler('foo') protected function myOtherHandler ($value) { } You will also need this - the static keyword in the PHPUnit_TextUI_Command will mean that it'll be PHPUnit_TextUI_Command that gets instantiated, not MyCommand public static function main($exit = true) { $command = new static; return $command->run($_SERVER['argv'], $exit); } }
protected handleArguments ( array $argv )
$argv array

handleBootstrap() 보호된 메소드

Loads a bootstrap file.
protected handleBootstrap ( string $filename )
$filename string

handleCustomTestSuite() 보호된 메소드

Custom callback for test suite discovery.
protected handleCustomTestSuite ( )

handleLoader() 보호된 메소드

Handles the loading of the PHPUnit_Runner_TestSuiteLoader implementation.
protected handleLoader ( string $loaderClass, string $loaderFile = '' ) : PHPUnit_Runner_TestSuiteLoader
$loaderClass string
$loaderFile string
리턴 PHPUnit_Runner_TestSuiteLoader

handlePrinter() 보호된 메소드

Handles the loading of the PHPUnit_Util_Printer implementation.
protected handlePrinter ( string $printerClass, string $printerFile = '' ) : PHPUnit_Util_Printer
$printerClass string
$printerFile string
리턴 PHPUnit_Util_Printer

handleVersionCheck() 보호된 메소드

protected handleVersionCheck ( )

main() 공개 정적인 메소드

public static main ( boolean $exit = true )
$exit boolean

run() 공개 메소드

public run ( array $argv, boolean $exit = true ) : integer
$argv array
$exit boolean
리턴 integer

showHelp() 보호된 메소드

Show the help message.
protected showHelp ( )

프로퍼티 상세

$arguments 보호되어 있는 프로퍼티

protected array $arguments
리턴 array

$longOptions 보호되어 있는 프로퍼티

protected array $longOptions
리턴 array

$options 보호되어 있는 프로퍼티

protected array $options
리턴 array