PHP 클래스 lithium\tests\cases\console\command\RouteTest

상속: extends lithium\test\Unit
파일 보기 프로젝트 열기: unionofrad/lithium

보호된 프로퍼티들

프로퍼티 타입 설명
$_config array Holds config params.
$_testPath string Holds the temporary test path.

공개 메소드들

메소드 설명
setUp ( ) Create a temporary routes.php file for testing and reset the router.
skip ( ) Set the testPath and check if it is writable (skip if not).
tearDown ( ) Delete the temporary routes.php file.
testAllWithEnvironment ( ) Tests the "all" command with an env (production) param.
testAllWithoutEnvironment ( ) Tests the "all" command without an env param.
testEnvironment ( ) Tests if the default environment is loaded correctly and if overriding works as expected.
testRouteLoading ( ) Test if the routes.php file is loaded correctly and the routes are connected to the router.
testRun ( ) Test the alias method for "all".
testShowWithEnvironment ( ) Test the show command with a env param.
testShowWithHttpMethod ( ) Test the show command with http method.
testShowWithInvalidRoute ( ) Test the show command with an invalid route.
testShowWithNoRoute ( ) Test the show command with no route.
testShowWithValidRoute ( ) Test the show command with a valid route.

보호된 메소드들

메소드 설명
_strip ( string $str ) : string Remove formatting whitespace, tabs and newlines for better sourcecode readability.

메소드 상세

_strip() 보호된 메소드

Remove formatting whitespace, tabs and newlines for better sourcecode readability.
protected _strip ( string $str ) : string
$str string A string from which to strip spaces
리턴 string Returns the value of `$str` with all whitespace removed.

setUp() 공개 메소드

Create a temporary routes.php file for testing and reset the router.
public setUp ( )

skip() 공개 메소드

Set the testPath and check if it is writable (skip if not).
public skip ( )

tearDown() 공개 메소드

Delete the temporary routes.php file.
public tearDown ( )

testAllWithEnvironment() 공개 메소드

Don't be confused if the expected output doesn't make sense here. We are stripping the whitespace away so that this source code is easier to read. Built-In methods are used for output formatting and are tested elsewhere.

testAllWithoutEnvironment() 공개 메소드

Don't be confused if the expected output doesn't make sense here. We are stripping the whitespace away so that this source code is easier to read. Built-In methods are used for output formatting and are tested elsewhere.

testEnvironment() 공개 메소드

Tests if the default environment is loaded correctly and if overriding works as expected.
public testEnvironment ( )

testRouteLoading() 공개 메소드

Test if the routes.php file is loaded correctly and the routes are connected to the router.
public testRouteLoading ( )

testRun() 공개 메소드

Test the alias method for "all".
public testRun ( )

testShowWithEnvironment() 공개 메소드

Test the show command with a env param.

testShowWithHttpMethod() 공개 메소드

This tests a call similar to "li3 route GET /".

testShowWithInvalidRoute() 공개 메소드

Test the show command with an invalid route.

testShowWithNoRoute() 공개 메소드

Test the show command with no route.
public testShowWithNoRoute ( )

testShowWithValidRoute() 공개 메소드

Test the show command with a valid route.

프로퍼티 상세

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

Holds config params.
protected array $_config
리턴 array

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

Holds the temporary test path.
protected string $_testPath
리턴 string