OnCampusListenerTest
extends TestCase
in package
Uses
MockSearchCommandTrait
Unit tests for OnCampus listener.
Tags
Table of Contents
- $backend : BackendInterface
- Backend.
- testAttach() : void
- Test attaching listener.
- testAttachWithParameter() : void
- Test attaching listener with parameter.
- testOnCampusDefaultNotSuccessfull() : void
- Test the listener if default permission rule applies and default permission is not enough to get Primo results
- testOnCampusDefaultSuccessfull() : void
- Test the listener if default permission rule applies
- testOnCampusInsideNetwork() : void
- Test the listener if certain rule applies (user is inside a configured network)
- testOnCampusNoPermissionController() : void
- Test the listener if no permission controller exists
- testOnCampusOutsideNetwork() : void
- Test the listener if certain rule applies (user is outside of any configured network)
- testOnCampusWithoutAuthorizationService() : void
- Test the listener without setting an authorization service.
- getMockPreEvent() : Event
- Construct a mock search backend pre event.
- getMockSearchCommand() : AbstractBase
- Get a mock search command.
- setUp() : void
- Setup.
Properties
$backend
Backend.
protected
BackendInterface
$backend
Methods
testAttach()
Test attaching listener.
public
testAttach() : void
Return values
void —testAttachWithParameter()
Test attaching listener with parameter.
public
testAttachWithParameter() : void
Return values
void —testOnCampusDefaultNotSuccessfull()
Test the listener if default permission rule applies and default permission is not enough to get Primo results
public
testOnCampusDefaultNotSuccessfull() : void
Return values
void —testOnCampusDefaultSuccessfull()
Test the listener if default permission rule applies
public
testOnCampusDefaultSuccessfull() : void
Return values
void —testOnCampusInsideNetwork()
Test the listener if certain rule applies (user is inside a configured network)
public
testOnCampusInsideNetwork() : void
Return values
void —testOnCampusNoPermissionController()
Test the listener if no permission controller exists
public
testOnCampusNoPermissionController() : void
Return values
void —testOnCampusOutsideNetwork()
Test the listener if certain rule applies (user is outside of any configured network)
public
testOnCampusOutsideNetwork() : void
Return values
void —testOnCampusWithoutAuthorizationService()
Test the listener without setting an authorization service.
public
testOnCampusWithoutAuthorizationService() : void
This should return false.
Return values
void —getMockPreEvent()
Construct a mock search backend pre event.
protected
getMockPreEvent(ParamBag $params) : Event
Parameters
- $params : ParamBag
-
Search backend parameters
Return values
Event —getMockSearchCommand()
Get a mock search command.
protected
getMockSearchCommand([ParamBag $params = null ][, mixed $context = null ][, string $backendId = 'foo' ][, mixed $result = null ]) : AbstractBase
Parameters
- $params : ParamBag = null
-
Parameters for command to return
- $context : mixed = null
-
Context for command to return
- $backendId : string = 'foo'
-
Backend ID for command
- $result : mixed = null
-
Result to return
Return values
AbstractBase —setUp()
Setup.
protected
setUp() : void