InjectHighlightingListenerTest
extends TestCase
in package
Uses
MockSearchCommandTrait, WithConsecutiveTrait
Unit tests for inject highlighting listener.
Tags
Table of Contents
- $backend : BackendInterface
- Backend.
- $listener : MultiIndexListener
- Prepare listener.
- testAttach() : void
- Test attaching listener.
- testParameters() : void
- Test that appropriate parameters are sent to connector.
- expectConsecutiveCalls() : InvocationStubber
- Expect consecutive calls to a mock.
- getMockSearchCommand() : AbstractBase
- Get a mock search command.
- setUp() : void
- Setup.
Properties
$backend
Backend.
protected
BackendInterface
$backend
$listener
Prepare listener.
protected
MultiIndexListener
$listener
Methods
testAttach()
Test attaching listener.
public
testAttach() : void
Return values
void —testParameters()
Test that appropriate parameters are sent to connector.
public
testParameters() : void
Return values
void —expectConsecutiveCalls()
Expect consecutive calls to a mock.
protected
expectConsecutiveCalls(MockObject $mock, string $method, array<string|int, mixed> $expectedCalls[, mixed $returnValues = null ]) : InvocationStubber
Parameters
- $mock : MockObject
-
Mock object
- $method : string
-
Method expecting calls
- $expectedCalls : array<string|int, mixed>
-
Expected input parameters
- $returnValues : mixed = null
-
Return values to mock (either an array indexed parallel to $expectedCalls to return different values, or a single value to always return the same thing)
Return values
InvocationStubber —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