PHP Class Elgg\Mocks\Database\RelationshipsTable

It populates the mock database with query specifications for predictable results when relationship are requested or deleted. Note that this mock is not designed for testing the relationships table itself. When testing the relationships table, you should define query specs individually for the method being tested.
Inheritance: extends Elgg\Database\RelationshipsTable
Show file Open project: elgg/elgg

Public Properties

Property Type Description
$rows stdClas\stdClass[]

Public Methods

Method Description
add ( $guid_one, $relationship, $guid_two, $return_id = false )
addQuerySpecs ( stdClass $row ) : void Add query specs for a relationship data row
clearQuerySpecs ( integer $id ) : void Clear query specs

Method Details

add() public method

public add ( $guid_one, $relationship, $guid_two, $return_id = false )

addQuerySpecs() public method

Add query specs for a relationship data row
public addQuerySpecs ( stdClass $row ) : void
$row stdClass Data row
return void

clearQuerySpecs() public method

Clear query specs
public clearQuerySpecs ( integer $id ) : void
$id integer Relationship ID
return void

Property Details

$rows public property

public stdClass[],stdClas $rows
return stdClas\stdClass[]