DeleteCommandTest
extends TestCase
in package
Uses
FixtureTrait
Language/Delete command test.
Tags
Table of Contents
- $languageFixtureDir : string
- Language fixture directory
- setUp() : void
- Standard setup method.
- testDeletingNonExistentString() : void
- Test an attempt to delete a string that does not exist.
- testSuccessWithMinimalParameters() : void
- Test the simplest possible success case.
- testWithoutParameters() : void
- Test that missing parameters yield an error message.
- 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).
- getMockCommand() : AddUsingTemplateCommand
- Get a mock command object
- getMockNormalizer() : ExtendedIniNormalizer
- Get a mock normalizer object
- getMockReader() : ExtendedIniReader
- Get a mock reader object
Properties
$languageFixtureDir
Language fixture directory
protected
string
$languageFixtureDir
= null
Methods
setUp()
Standard setup method.
public
setUp() : void
Return values
void —testDeletingNonExistentString()
Test an attempt to delete a string that does not exist.
public
testDeletingNonExistentString() : void
Return values
void —testSuccessWithMinimalParameters()
Test the simplest possible success case.
public
testSuccessWithMinimalParameters() : void
Return values
void —testWithoutParameters()
Test that missing parameters yield an error message.
public
testWithoutParameters() : void
Return values
void —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> —getMockCommand()
Get a mock command object
protected
getMockCommand([ExtendedIniNormalizer $normalizer = null ][, ExtendedIniReader $reader = null ][, string $languageDir = null ][, array<string|int, mixed> $methods = ['writeFileToDisk'] ]) : AddUsingTemplateCommand
Parameters
- $normalizer : ExtendedIniNormalizer = null
-
Normalizer for .ini files
- $reader : ExtendedIniReader = null
-
Reader for .ini files
- $languageDir : string = null
-
Base language file directory
- $methods : array<string|int, mixed> = ['writeFileToDisk']
-
Methods to mock
Return values
AddUsingTemplateCommand —getMockNormalizer()
Get a mock normalizer object
protected
getMockNormalizer([array<string|int, mixed> $methods = [] ]) : ExtendedIniNormalizer
Parameters
- $methods : array<string|int, mixed> = []
-
Methods to mock
Return values
ExtendedIniNormalizer —getMockReader()
Get a mock reader object
protected
getMockReader([array<string|int, mixed> $methods = [] ]) : ExtendedIniReader
Parameters
- $methods : array<string|int, mixed> = []
-
Methods to mock