VuFind API Documentation

EmailTest extends TestCase
in package
Uses WithConsecutiveTrait, ReflectionTrait

Email Form Handler Test Class

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Wiki

Table of Contents

testDefaultEmailBehaviorNoConfig()  : void
Test default email values with no configuration specified.
testDefaultEmailBehaviorWithConfig()  : void
Test default email values with configuration specified.
testExtractDataFromUserObject()  : void
Test user object handling.
testHandleMissingUserObject()  : void
Test absent user object handling.
callMethod()  : mixed
Call protected or private method for side-effect and result.
expectConsecutiveCalls()  : InvocationStubber
Expect consecutive calls to a mock.
getHandler()  : Email
Get a handler configured for testing.
getProperty()  : mixed
Return protected or private property.
setProperty()  : void
Set protected or private property.

Methods

testDefaultEmailBehaviorNoConfig()

Test default email values with no configuration specified.

public testDefaultEmailBehaviorNoConfig() : void
Return values
void

testDefaultEmailBehaviorWithConfig()

Test default email values with configuration specified.

public testDefaultEmailBehaviorWithConfig() : void
Return values
void

testExtractDataFromUserObject()

Test user object handling.

public testExtractDataFromUserObject() : void
Return values
void

testHandleMissingUserObject()

Test absent user object handling.

public testHandleMissingUserObject() : void
Return values
void

callMethod()

Call protected or private method for side-effect and result.

protected callMethod(object|string $object, string $method[, array<string|int, mixed> $arguments = [] ]) : mixed

Uses PHP's reflection API in order to modify method accessibility.

Parameters
$object : object|string

Object or class name

$method : string

Method name

$arguments : array<string|int, mixed> = []

Method arguments

Tags
throws
ReflectionException

Method does not exist

Return values
mixed

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

getHandler()

Get a handler configured for testing.

protected getHandler([array<string|int, mixed> $config = [] ]) : Email
Parameters
$config : array<string|int, mixed> = []

Configuration array

Return values
Email

getProperty()

Return protected or private property.

protected getProperty(object|string $object, string $property) : mixed

Uses PHP's reflection API in order to modify property accessibility.

Parameters
$object : object|string

Object or class name

$property : string

Property name

Tags
throws
ReflectionException

Property does not exist

Return values
mixed

setProperty()

Set protected or private property.

protected setProperty(object|string $object, string $property, mixed $value) : void

Uses PHP's reflection API in order to modify property accessibility.

Parameters
$object : object|string

Object or class name

$property : string

Property name

$value : mixed

Property value

Tags
throws
ReflectionException

Property does not exist

Return values
void

Search results