VuFind API Documentation

ChangeTrackerTest extends TestCase
in package
Uses LiveDatabaseTrait, LiveDetectionTrait

ChangeTracker Test Class

Class must be final due to use of "new static()" by LiveDatabaseTrait.

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

$hasLiveDatabaseTrait  : bool
Flag to allow other traits to test for the presence of this one (to enforce dependencies).
$hasLiveDetectionTrait  : bool
Flag to allow other traits to test for the presence of this one (to enforce dependencies).
$liveDatabaseContainer  : MockContainer|null
Container connected to live database.
continuousIntegrationRunning()  : bool
Is this test running in a continuous integration context?
getDbService()  : DbServiceInterface
Get a database service.
getFavoritesService()  : FavoritesService
Get the favorites service.
getLiveDatabaseContainer()  : MockContainer
Get a real, working table manager.
getLiveDbServiceManager()  : PluginManager
Get a real, working database service manager.
getLiveTableManager()  : PluginManager
Get a real, working table manager.
getTable()  : Gateway
Get a table object.
setUp()  : void
Standard setup method.
testChangeTracker()  : void
Test change tracking
failIfDataExists()  : void
Static setup support function to fail if there is already data in the database. We want to ensure a clean state for each test!
removeUsers()  : void
Static teardown support function to destroy user accounts. Accounts are expected to exist, and the method will fail if they are missing.

Properties

$hasLiveDatabaseTrait

Flag to allow other traits to test for the presence of this one (to enforce dependencies).

public bool $hasLiveDatabaseTrait = true

$hasLiveDetectionTrait

Flag to allow other traits to test for the presence of this one (to enforce dependencies).

public bool $hasLiveDetectionTrait = true

Methods

continuousIntegrationRunning()

Is this test running in a continuous integration context?

public continuousIntegrationRunning() : bool
Return values
bool

getTable()

Get a table object.

public getTable(string $table) : Gateway
Parameters
$table : string

Name of table to load

Return values
Gateway

testChangeTracker()

Test change tracking

public testChangeTracker() : void
Return values
void

failIfDataExists()

Static setup support function to fail if there is already data in the database. We want to ensure a clean state for each test!

protected static failIfDataExists([string|null $failMessage = null ]) : void
Parameters
$failMessage : string|null = null

Failure message to display if data exists (null for default).

Return values
void

removeUsers()

Static teardown support function to destroy user accounts. Accounts are expected to exist, and the method will fail if they are missing.

protected static removeUsers(array<string|int, string>|string $users) : void
Parameters
$users : array<string|int, string>|string

User(s) to delete

Tags
throws
Exception
Return values
void

Search results