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
Afficher le fichier Open project: jyxo/php

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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

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

Method Details

getFileExtension() abstract protected méthode

Returns test files extension.
abstract protected getFileExtension ( ) : string
Résultat string

getServerInstance() abstract protected méthode

Returns server instance.
abstract protected getServerInstance ( ) : Server
Résultat Server

logCallback() public static méthode

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
Résultat array

setUp() protected méthode

Sets the testing environment.
protected setUp ( )

tearDown() protected méthode

Cleans up the environment after testing.
protected tearDown ( )

testClone() public méthode

Tests clone-preventing.
public testClone ( )

testEmptyLogFile() public méthode

Tests setting an empty log file.
public testEmptyLogFile ( )

testLog() public méthode

Tests logging.
public testLog ( )

testParseError() public méthode

Tests bad request (parse error)
public testParseError ( )

testProcessFunction() public méthode

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

testProcessMethodByCall() public méthode

Tests method call using a __call magic function.

testProcessMethodByCallStatic() public méthode

Tests method call using a __callStatic magic function.

testProcessMethodRegisteredByClass() public méthode

Tests calling a method registered using the whole class.

testProcessMethodWithFullName() public méthode

Tests method call using the full name.

testProcessMethodWithShortName() public méthode

Tests method call using the short name.

testProcessNonExistingMethod() public méthode

Tests calling a non-existent method.

testProcessStaticMethod() public méthode

Tests method call using a static method.

testRegisterMethodInNonExistingClass() public méthode

Tests registering a method of a non-existent class.

testRegisterNonExistingClass() public méthode

Tests registering of a non-existent class.

testRegisterNonExistingFunction() public méthode

Tests registering a non-existent function.

testRegisterNonExistingMethod() public méthode

Tests registering a non-existent method.

testRegisterNonPublicMethod() public méthode

Tests registering a non-public method.