CacheTest
extends TestCase
in package
Record cache tests.
Tags
Table of Contents
- $recordData : array<string|int, RecordEntityInterface>
- Set of test records.
- testCreateOrUpdate() : void
- Test createOrUpdate
- testIsCachable() : void
- Test IsCachable
- testIsFallback() : void
- Test isFallback
- testIsPrimary() : void
- Test isPrimary
- testLookup() : void
- Test lookup
- testLookupBatch() : void
- Test lookupBatch
- testSetContext() : void
- Test setContext
- getConfig() : Config
- Create configuration
- getDriver() : AbstractBase
- Create a record driver
- getMockRecord() : RecordEntityInterface
- Create a mock record that will return the provided values.
- getRecordCache() : Cache
- Create a Cache object
- getRecordFactoryManager() : MockObject|PluginManager
- Create a Record Factory Manager
- getRecordService() : MockObject|RecordServiceInterface
- Create Record Table
- setUp() : void
- Set up everything for testing
Properties
$recordData
Set of test records.
protected
array<string|int, RecordEntityInterface>
$recordData
= []
Methods
testCreateOrUpdate()
Test createOrUpdate
public
testCreateOrUpdate() : void
Return values
void —testIsCachable()
Test IsCachable
public
testIsCachable() : void
Return values
void —testIsFallback()
Test isFallback
public
testIsFallback() : void
Return values
void —testIsPrimary()
Test isPrimary
public
testIsPrimary() : void
Return values
void —testLookup()
Test lookup
public
testLookup() : void
Return values
void —testLookupBatch()
Test lookupBatch
public
testLookupBatch() : void
Return values
void —testSetContext()
Test setContext
public
testSetContext() : void
Return values
void —getConfig()
Create configuration
protected
getConfig() : Config
Return values
Config —getDriver()
Create a record driver
protected
getDriver([string $id = 'test' ][, string $source = 'Solr' ]) : AbstractBase
Parameters
- $id : string = 'test'
-
id
- $source : string = 'Solr'
-
source
Return values
AbstractBase —getMockRecord()
Create a mock record that will return the provided values.
protected
getMockRecord(string $id, string $source, string $data[, string $version = '2.5' ]) : RecordEntityInterface
Parameters
- $id : string
-
Record ID
- $source : string
-
Record source
- $data : string
-
Data
- $version : string = '2.5'
-
Version
Return values
RecordEntityInterface —getRecordCache()
Create a Cache object
protected
getRecordCache() : Cache
Return values
Cache —getRecordFactoryManager()
Create a Record Factory Manager
protected
getRecordFactoryManager() : MockObject|PluginManager
Return values
MockObject|PluginManager —getRecordService()
Create Record Table
protected
getRecordService() : MockObject|RecordServiceInterface
Return values
MockObject|RecordServiceInterface —setUp()
Set up everything for testing
protected
setUp() : void