PHP Class Kraken\_Unit\Network\Socket\SocketServerTest

Inheritance: extends Kraken\Test\TUnit
Show file Open project: kraken-php/framework

Public Methods

Method Description
createComponent ( ) : Kraken\Network\NetworkComponentInterface | PHPUnit_Framework_MockObject_MockObject
createListener ( ) : Kraken\Ipc\Socket\SocketListenerInterface | PHPUnit_Framework_MockObject_MockObject
createSocketServer ( Kraken\Ipc\Socket\SocketListenerInterface $listener, Kraken\Network\NetworkComponentInterface $component, string[] | null $methods = null ) : SocketServer | PHPUnit_Framework_MockObject_MockObject
testApiConstructor_CreatesInstance ( )
testApiDestructor_DoesNotThrowException ( )
testApiGetComponent_ReturnsComponent ( )
testApiHandleConnect_AttachesHandlers ( )
testApiHandleConnect_CallsMethodOnComponent ( )
testApiHandleConnect_ClosesConnection_WhenComponentThrowsException ( )
testApiHandleData_CallsMethodOnComponent ( )
testApiHandleData_TriesToHandleError_WhenComponentThrowsException ( )
testApiHandleDisconnect_CallsMethodOnComponent ( )
testApiHandleDisconnect_TriesToHandleError_WhenComponentThrowsException ( )
testApiHandleError_CallsMethodOnComponent ( )
testApiHandleError_TriesToHandleError_WhenComponentThrowsException ( )
testApiSetComponent_SetsComponent_WhenComponentIsProvided ( )
testApiSetComponent_SetsNullComponent_WhenComponentIsNotProvided ( )
testProtectedApiClose_ClosesSocket ( )

Method Details

createComponent() public method

public createComponent ( ) : Kraken\Network\NetworkComponentInterface | PHPUnit_Framework_MockObject_MockObject
return Kraken\Network\NetworkComponentInterface | PHPUnit_Framework_MockObject_MockObject

createListener() public method

public createListener ( ) : Kraken\Ipc\Socket\SocketListenerInterface | PHPUnit_Framework_MockObject_MockObject
return Kraken\Ipc\Socket\SocketListenerInterface | PHPUnit_Framework_MockObject_MockObject

createSocketServer() public method

public createSocketServer ( Kraken\Ipc\Socket\SocketListenerInterface $listener, Kraken\Network\NetworkComponentInterface $component, string[] | null $methods = null ) : SocketServer | PHPUnit_Framework_MockObject_MockObject
$listener Kraken\Ipc\Socket\SocketListenerInterface
$component Kraken\Network\NetworkComponentInterface
$methods string[] | null
return Kraken\Network\Socket\SocketServer | PHPUnit_Framework_MockObject_MockObject

testApiConstructor_CreatesInstance() public method

testApiDestructor_DoesNotThrowException() public method

testApiGetComponent_ReturnsComponent() public method

testApiHandleConnect_AttachesHandlers() public method

testApiHandleConnect_CallsMethodOnComponent() public method

testApiHandleConnect_ClosesConnection_WhenComponentThrowsException() public method

testApiHandleData_CallsMethodOnComponent() public method

testApiHandleData_TriesToHandleError_WhenComponentThrowsException() public method

testApiHandleDisconnect_CallsMethodOnComponent() public method

testApiHandleDisconnect_TriesToHandleError_WhenComponentThrowsException() public method

testApiHandleError_CallsMethodOnComponent() public method

testApiHandleError_TriesToHandleError_WhenComponentThrowsException() public method

testApiSetComponent_SetsComponent_WhenComponentIsProvided() public method

testApiSetComponent_SetsNullComponent_WhenComponentIsNotProvided() public method

testProtectedApiClose_ClosesSocket() public method