VuFind API Documentation

AbstractExpireCommandTest extends TestCase
in package
Uses WithConsecutiveTrait

AbstractExpireCommand test.

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

$expectedMinAge  : int
Expected minimum age in error message.
$illegalAge  : int
Age parameter to use when testing illegal age input.
$rowLabel  : string
Label to use for rows in help messages.
$targetClass  : string
Name of class being tested
$validServiceClass  : string
Name of a valid service class (or interface) to test with
testIllegalAgeInput()  : void
Test an illegal age parameter.
testSuccessfulExpiration()  : void
Test that the command expires rows correctly.
testSuccessfulNonExpiration()  : void
Test correct behavior when no rows need to be expired.
expectConsecutiveCalls()  : InvocationStubber
Expect consecutive calls to a mock.
getCommand()  : MockObject|AbstractExpireCommand
Get the command class

Properties

$targetClass

Name of class being tested

protected string $targetClass = \VuFindConsole\Command\Util\AbstractExpireCommand::class

$validServiceClass

Name of a valid service class (or interface) to test with

protected string $validServiceClass = \VuFind\Db\Service\Feature\DeleteExpiredInterface::class

Methods

testIllegalAgeInput()

Test an illegal age parameter.

public testIllegalAgeInput() : void
Return values
void

testSuccessfulExpiration()

Test that the command expires rows correctly.

public testSuccessfulExpiration() : void
Return values
void

testSuccessfulNonExpiration()

Test correct behavior when no rows need to be expired.

public testSuccessfulNonExpiration() : 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

Search results