PHP Class ElggCoreUnitTest, Elgg

This class is to be extended by all Elgg unit tests. As such, any method here will be available to the tests.
Inheritance: extends UnitTestCase
Mostra file Open project: elgg/elgg Class Usage Examples

Public Methods

Method Description
__construct ( ) Class constructor.
__destruct ( ) Class destructor.
assertIdenticalEntities ( ElggEntity $first, ElggEntity $second, string $message = '%s' ) : boolean Will trigger a pass if the two entity parameters have the same "value" and same type. Otherwise a fail.
replaceSession ( ElggUser $user = null ) : ElggUser | null Replace the current user session

Method Details

__construct() public method

A simple wrapper to call the parent constructor.
public __construct ( )

__destruct() public method

The parent does not provide a destructor, so including an explicit one here.
public __destruct ( )

assertIdenticalEntities() public method

Will trigger a pass if the two entity parameters have the same "value" and same type. Otherwise a fail.
public assertIdenticalEntities ( ElggEntity $first, ElggEntity $second, string $message = '%s' ) : boolean
$first ElggEntity Entity to compare.
$second ElggEntity Entity to compare.
$message string Message to display.
return boolean

replaceSession() public method

Replace the current user session
public replaceSession ( ElggUser $user = null ) : ElggUser | null
$user ElggUser New user to login as (null to log out)
return ElggUser | null Removed session user (or null)