UpgradeTest
extends TestCase
in package
Uses
FixtureTrait, ReflectionTrait
Config Upgrade Test Class
Tags
Table of Contents
- $targetVersion : string
- Target upgrade version
- mailRequireLoginProvider() : array<string|int, array<string|int, mixed>>
- Data provider for testMailRequireLoginMigration().
- testAmazonCoverWarning() : void
- Test deprecated Amazon cover content warning.
- testAmazonReviewWarning() : void
- Test deprecated Amazon review content warning.
- testCommentExtraction() : void
- Test comment extraction.
- testDefaultGenerator() : void
- Test generator upgrade.
- testGooglePreviewUpgrade() : void
- Test Google preview setting upgrade
- testGoogleWarnings() : void
- Test Google-related warnings.
- testMailRequireLoginMigration() : void
- Test migration of [Mail] require_login setting.
- testMeaningfulLineDetection() : void
- Test "meaningful line" detection in SolrMarc properties files.
- testPermissionUpgrade() : void
- Test permission upgrade
- testPrimoUpgrade() : void
- Test Primo upgrade.
- testReCaptcha() : void
- Test ReCaptcha setting migration.
- testSpelling() : void
- Test spellchecker changes.
- testSyndetics() : void
- Test Syndetics upgrade.
- testUpgrade11() : void
- Test upgrading from 1.1.
- testUpgrade12() : void
- Test upgrading from 1.2.
- testUpgrade13() : void
- Test upgrading from 1.3.
- testUpgrade14() : void
- Test upgrading from 1.4.
- testWorldCatUpgrades() : void
- Test WorldCat-specific upgrades.
- testWorldCatWarnings() : void
- Test WorldCat-related warnings.
- testXidDeprecation() : void
- Test removal of xID settings
- callMethod() : mixed
- Call protected or private method for side-effect and result.
- checkVersion() : array<string|int, mixed>
- Perform standard tests for the specified version and return resulting configs and warnings so that further assertions can be performed by calling code if necessary.
- getFixture() : string
- Load a fixture file.
- getFixtureDir() : string
- Get the base directory containing fixtures.
- getFixturePath() : string
- Resolve fixture path.
- getJsonFixture() : array<string|int, mixed>
- Load a JSON fixture from file (using associative array return type).
- getProperty() : mixed
- Return protected or private property.
- getUpgrader() : Upgrade
- Get an upgrade object for the specified source version:
- setProperty() : void
- Set protected or private property.
Properties
$targetVersion
Target upgrade version
protected
string
$targetVersion
= '2.4'
Methods
mailRequireLoginProvider()
Data provider for testMailRequireLoginMigration().
public
static mailRequireLoginProvider() : array<string|int, array<string|int, mixed>>
Return values
array<string|int, array<string|int, mixed>> —testAmazonCoverWarning()
Test deprecated Amazon cover content warning.
public
testAmazonCoverWarning() : void
Return values
void —testAmazonReviewWarning()
Test deprecated Amazon review content warning.
public
testAmazonReviewWarning() : void
Return values
void —testCommentExtraction()
Test comment extraction.
public
testCommentExtraction() : void
Return values
void —testDefaultGenerator()
Test generator upgrade.
public
testDefaultGenerator() : void
Return values
void —testGooglePreviewUpgrade()
Test Google preview setting upgrade
public
testGooglePreviewUpgrade() : void
Return values
void —testGoogleWarnings()
Test Google-related warnings.
public
testGoogleWarnings() : void
Return values
void —testMailRequireLoginMigration()
Test migration of [Mail] require_login setting.
public
testMailRequireLoginMigration(string $fixture, string $expected) : void
Parameters
- $fixture : string
-
Fixture to load
- $expected : string
-
Expected migrated setting
Tags
Return values
void —testMeaningfulLineDetection()
Test "meaningful line" detection in SolrMarc properties files.
public
testMeaningfulLineDetection() : void
Return values
void —testPermissionUpgrade()
Test permission upgrade
public
testPermissionUpgrade() : void
Return values
void —testPrimoUpgrade()
Test Primo upgrade.
public
testPrimoUpgrade() : void
Return values
void —testReCaptcha()
Test ReCaptcha setting migration.
public
testReCaptcha() : void
Return values
void —testSpelling()
Test spellchecker changes.
public
testSpelling() : void
Return values
void —testSyndetics()
Test Syndetics upgrade.
public
testSyndetics() : void
Return values
void —testUpgrade11()
Test upgrading from 1.1.
public
testUpgrade11() : void
Return values
void —testUpgrade12()
Test upgrading from 1.2.
public
testUpgrade12() : void
Return values
void —testUpgrade13()
Test upgrading from 1.3.
public
testUpgrade13() : void
Return values
void —testUpgrade14()
Test upgrading from 1.4.
public
testUpgrade14() : void
Return values
void —testWorldCatUpgrades()
Test WorldCat-specific upgrades.
public
testWorldCatUpgrades() : void
Return values
void —testWorldCatWarnings()
Test WorldCat-related warnings.
public
testWorldCatWarnings() : void
Return values
void —testXidDeprecation()
Test removal of xID settings
public
testXidDeprecation() : 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
Return values
mixed —checkVersion()
Perform standard tests for the specified version and return resulting configs and warnings so that further assertions can be performed by calling code if necessary.
protected
checkVersion(string $version) : array<string|int, mixed>
Parameters
- $version : string
-
Version to test
Return values
array<string|int, mixed> —getFixture()
Load a fixture file.
protected
getFixture(string $filename[, string $module = 'VuFind' ]) : string
Parameters
- $filename : string
-
Filename relative to fixture directory.
- $module : string = 'VuFind'
-
Module containing fixture.
Tags
Return values
string —getFixtureDir()
Get the base directory containing fixtures.
protected
getFixtureDir([string $module = 'VuFind' ]) : string
Parameters
- $module : string = 'VuFind'
-
Module containing fixture.
Return values
string —getFixturePath()
Resolve fixture path.
protected
getFixturePath(string $filename[, string $module = 'VuFind' ]) : string
Parameters
- $filename : string
-
Filename relative to fixture directory.
- $module : string = 'VuFind'
-
Module containing fixture.
Tags
Return values
string —getJsonFixture()
Load a JSON fixture from file (using associative array return type).
protected
getJsonFixture(string $filename[, string $module = 'VuFind' ]) : array<string|int, mixed>
Parameters
- $filename : string
-
Filename relative to fixture directory.
- $module : string = 'VuFind'
-
Module containing fixture.
Return values
array<string|int, mixed> —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
Return values
mixed —getUpgrader()
Get an upgrade object for the specified source version:
protected
getUpgrader(string $version) : Upgrade
Parameters
- $version : string
-
Version
Return values
Upgrade —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