Bristol SU Support Package
Public Member Functions | Private Attributes | List of all members
BristolSU\Support\Testing\LogicTester\LogicTesterFake Class Reference
Inheritance diagram for BristolSU\Support\Testing\LogicTester\LogicTesterFake:
Inheritance graph
[legend]
Collaboration diagram for BristolSU\Support\Testing\LogicTester\LogicTesterFake:
Collaboration graph
[legend]

Public Member Functions

 forLogic (Logic $logic)
 
 bind ()
 
 evaluate (Logic $logic, $userModel=null, $groupModel=null, $roleModel=null)
 

Private Attributes

 $results = []
 

Detailed Description

A Logic Tester implementation used for manually setting logic group results

Definition at line 14 of file LogicTesterFake.php.

Member Function Documentation

◆ bind()

BristolSU\Support\Testing\LogicTester\LogicTesterFake::bind ( )

Definition at line 38 of file LogicTesterFake.php.

◆ evaluate()

BristolSU\Support\Testing\LogicTester\LogicTesterFake::evaluate ( Logic  $logic,
  $userModel = null,
  $groupModel = null,
  $roleModel = null 
)

See if the given credentials have a predetermined result for the given logic

Parameters
Logic$logicLogic to test
User | null$userModelUser to test against
Group | null$groupModelGroup to test against
Role | null$roleModelRole to test against
Returns
bool

Implements BristolSU\Support\Logic\Contracts\LogicTester.

Definition at line 53 of file LogicTesterFake.php.

◆ forLogic()

BristolSU\Support\Testing\LogicTester\LogicTesterFake::forLogic ( Logic  $logic)

Create a logic tester for a specific logic group

Parameters
Logic$logic
Returns
LogicTesterResult

Definition at line 30 of file LogicTesterFake.php.

Member Data Documentation

◆ $results

BristolSU\Support\Testing\LogicTester\LogicTesterFake::$results = []
private

Definition at line 22 of file LogicTesterFake.php.


The documentation for this class was generated from the following file: