PHP Class AppserverIo\Appserver\Core\Api\AbstractServiceTest

Author: Bernhard Wick ([email protected])
Author: Tim Wagner ([email protected])
Inheritance: extends AppserverIo\Appserver\Core\Api\AbstractServicesTest
Show file Open project: appserver-io/appserver

Protected Properties

Property Type Description
$service PHPUnit_Framework_MockObject_MockObject | AbstractService The abstract service instance to test.

Public Methods

Method Description
setUp ( ) : null Initializes the service instance to test.
testGetBaseDirectoryDirectoryAppended ( ) : null Tests the returning of a base directory appended by a given string
testGetBaseDirectoryNothingToAppend ( ) : null Tests the returning of a base directory without appending anything
testGetConfDirDirectoryAppended ( ) : null Tests if returning the configuration dir + appendage works
testGetConfDirNothingToAppend ( ) : null Tests if getting just the configuration directory works
testGetConfdDirDirectoryAppended ( ) : null Tests if returning the configuration sub-dir + appendage works
testGetConfdDirNothingToAppend ( ) : null Tests if getting just the configuration sub-directory works
testGetDeployDirDirectoryAppended ( ) : null Tests if returning the deploy dir + appendage works
testGetDeployDirNothingToAppend ( ) : null Tests if getting just the tmp directory works
testGetDirectories ( ) : null Test if directories get taken from our system configuration
testGetInitialContext ( ) : null Test if the initial context has successfully been initialized.
testGetLogDirDirectoryAppended ( ) : null Tests if returning the log dir + appendage works
testGetLogDirNothingToAppend ( ) : null Tests if getting just the log directory works
testGetOsIdentifier ( ) : null Check if we get a correctly trimmed identifier within a possible range
testGetSetSystemConfiguration ( ) : null Test if the getter/setter for the system configuration.
testGetSystemConfiguration ( ) : null Test if the system configuration has successfully been initialized.
testGetTmpDirDirectoryAppended ( ) : null Tests if getting the tmp directory + an appendage works
testGetTmpDirNothingToAppend ( ) : null Tests if getting just the tmp directory works
testGetWebappsDirDirectoryAppended ( ) : null Tests if returning the webapps dir + appendage works
testGetWebappsDirNothingToAppend ( ) : null Tests if getting just the webapps directory works
testGlobDir ( ) : null Rests if we can glob directories and files as we should
testNewInstance ( ) : null Test the new instance method.
testNewService ( ) : null Test the new service method.
testPersist ( ) : null Dummy test as there currently is now functionality behind the actual method
testRealpath ( ) : null Test if building the absolute path works like it should

Protected Methods

Method Description
getPartialServiceMock ( array $methodsToMock ) : PHPUnit_Framework_MockObject_MockObject | AbstractService Returns a partially mocked mock instance of our abstract service
skipOnWindows ( ) : null Use to skip your test on windows machines

Method Details

getPartialServiceMock() protected method

Returns a partially mocked mock instance of our abstract service
protected getPartialServiceMock ( array $methodsToMock ) : PHPUnit_Framework_MockObject_MockObject | AbstractService
$methodsToMock array The methods we want to mock besides 'findAll' and 'load'
return PHPUnit_Framework_MockObject_MockObject | AbstractService

setUp() public method

Initializes the service instance to test.
public setUp ( ) : null
return null

skipOnWindows() protected method

Use to skip your test on windows machines
protected skipOnWindows ( ) : null
return null

testGetBaseDirectoryDirectoryAppended() public method

Tests the returning of a base directory appended by a given string

testGetBaseDirectoryNothingToAppend() public method

Tests the returning of a base directory without appending anything

testGetConfDirDirectoryAppended() public method

Tests if returning the configuration dir + appendage works

testGetConfDirNothingToAppend() public method

Tests if getting just the configuration directory works

testGetConfdDirDirectoryAppended() public method

Tests if returning the configuration sub-dir + appendage works

testGetConfdDirNothingToAppend() public method

Tests if getting just the configuration sub-directory works

testGetDeployDirDirectoryAppended() public method

Tests if returning the deploy dir + appendage works

testGetDeployDirNothingToAppend() public method

Tests if getting just the tmp directory works

testGetDirectories() public method

Test if directories get taken from our system configuration
public testGetDirectories ( ) : null
return null

testGetInitialContext() public method

Test if the initial context has successfully been initialized.
public testGetInitialContext ( ) : null
return null

testGetLogDirDirectoryAppended() public method

Tests if returning the log dir + appendage works

testGetLogDirNothingToAppend() public method

Tests if getting just the log directory works
public testGetLogDirNothingToAppend ( ) : null
return null

testGetOsIdentifier() public method

Check if we get a correctly trimmed identifier within a possible range
See also: https://en.wikipedia.org/wiki/Uname#Table_of_standard_uname_output
public testGetOsIdentifier ( ) : null
return null

testGetSetSystemConfiguration() public method

Test if the getter/setter for the system configuration.

testGetSystemConfiguration() public method

Test if the system configuration has successfully been initialized.
public testGetSystemConfiguration ( ) : null
return null

testGetTmpDirDirectoryAppended() public method

Tests if getting the tmp directory + an appendage works

testGetTmpDirNothingToAppend() public method

Tests if getting just the tmp directory works
public testGetTmpDirNothingToAppend ( ) : null
return null

testGetWebappsDirDirectoryAppended() public method

Tests if returning the webapps dir + appendage works

testGetWebappsDirNothingToAppend() public method

Tests if getting just the webapps directory works

testGlobDir() public method

Rests if we can glob directories and files as we should
public testGlobDir ( ) : null
return null

testNewInstance() public method

Test the new instance method.
public testNewInstance ( ) : null
return null

testNewService() public method

Test the new service method.
public testNewService ( ) : null
return null

testPersist() public method

Dummy test as there currently is now functionality behind the actual method
public testPersist ( ) : null
return null

testRealpath() public method

Test if building the absolute path works like it should
public testRealpath ( ) : null
return null

Property Details

$service protected property

The abstract service instance to test.
protected PHPUnit_Framework_MockObject_MockObject|AbstractService,AppserverIo\Appserver\Core\Api $service
return PHPUnit_Framework_MockObject_MockObject | AbstractService