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.
显示文件
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.
__destruct()
public method
The parent does not provide a destructor, so including an explicit one here.
assertIdenticalEntities()
public method
Will trigger a pass if the two entity parameters have
the same "value" and same type. Otherwise a fail.
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) |