PHP Class Jyxo\Rpc\ServerTestCase

See also: Jyxo\Rpc\Json\Server
See also: Jyxo\Rpc\Xml\Server
Author: Jan Pěček
Author: Jaroslav Hanslík
Inheritance: extends PHPUnit_Framework_TestCase
Datei anzeigen Open project: jyxo/php

Public Methods

Method Description
logCallback ( string $method, array $params, mixed $result ) : array Callback function to alter log messages.
testClone ( ) Tests clone-preventing.
testEmptyLogFile ( ) Tests setting an empty log file.
testLog ( ) Tests logging.
testParseError ( ) Tests bad request (parse error)
testProcessFunction ( ) Tests calling a function registered as a method.
testProcessMethodByCall ( ) Tests method call using a __call magic function.
testProcessMethodByCallStatic ( ) Tests method call using a __callStatic magic function.
testProcessMethodRegisteredByClass ( ) Tests calling a method registered using the whole class.
testProcessMethodWithFullName ( ) Tests method call using the full name.
testProcessMethodWithShortName ( ) Tests method call using the short name.
testProcessNonExistingMethod ( ) Tests calling a non-existent method.
testProcessStaticMethod ( ) Tests method call using a static method.
testRegisterMethodInNonExistingClass ( ) Tests registering a method of a non-existent class.
testRegisterNonExistingClass ( ) Tests registering of a non-existent class.
testRegisterNonExistingFunction ( ) Tests registering a non-existent function.
testRegisterNonExistingMethod ( ) Tests registering a non-existent method.
testRegisterNonPublicMethod ( ) Tests registering a non-public method.

Protected Methods

Method Description
getFileExtension ( ) : string Returns test files extension.
getServerInstance ( ) : Server Returns server instance.
setUp ( ) Sets the testing environment.
tearDown ( ) Cleans up the environment after testing.

Private Methods

Method Description
checkServerOutput ( string $test ) Checks server response.
getFilePath ( string $file ) : string Returns file path.

Method Details

getFileExtension() abstract protected method

Returns test files extension.
abstract protected getFileExtension ( ) : string
return string

getServerInstance() abstract protected method

Returns server instance.
abstract protected getServerInstance ( ) : Server
return Server

logCallback() public static method

Callback function to alter log messages.
public static logCallback ( string $method, array $params, mixed $result ) : array
$method string Log method
$params array Log parameters
$result mixed Function result
return array

setUp() protected method

Sets the testing environment.
protected setUp ( )

tearDown() protected method

Cleans up the environment after testing.
protected tearDown ( )

testClone() public method

Tests clone-preventing.
public testClone ( )

testEmptyLogFile() public method

Tests setting an empty log file.
public testEmptyLogFile ( )

testLog() public method

Tests logging.
public testLog ( )

testParseError() public method

Tests bad request (parse error)
public testParseError ( )

testProcessFunction() public method

Tests calling a function registered as a method.
public testProcessFunction ( )

testProcessMethodByCall() public method

Tests method call using a __call magic function.

testProcessMethodByCallStatic() public method

Tests method call using a __callStatic magic function.

testProcessMethodRegisteredByClass() public method

Tests calling a method registered using the whole class.

testProcessMethodWithFullName() public method

Tests method call using the full name.

testProcessMethodWithShortName() public method

Tests method call using the short name.

testProcessNonExistingMethod() public method

Tests calling a non-existent method.

testProcessStaticMethod() public method

Tests method call using a static method.

testRegisterMethodInNonExistingClass() public method

Tests registering a method of a non-existent class.

testRegisterNonExistingClass() public method

Tests registering of a non-existent class.

testRegisterNonExistingFunction() public method

Tests registering a non-existent function.

testRegisterNonExistingMethod() public method

Tests registering a non-existent method.

testRegisterNonPublicMethod() public method

Tests registering a non-public method.