VuFind API Documentation

SorterTest extends TestCase
in package

Class SorterTest

Tags
category

VuFind

author

Josef Moravec moravec@mzk.cz

license

https://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Wiki

Table of Contents

asortProvider()  : array<string|int, mixed>
Data Provider for asort tests
compareProvider()  : array<string|int, mixed>
Data Provider for compare tests
natsortProvider()  : array<string|int, mixed>
Data provider for testNatsort()
sortProvider()  : array<string|int, mixed>
Data Provider for sort tests
testAsort()  : void
Test asort function
testCompare()  : void
Test compare function
testNatsort()  : void
Test natsort function
testSort()  : void
Test sort function
createSorter()  : Sorter
Create sorter
getSorterForTest()  : Sorter
Get sorter for current test

Methods

asortProvider()

Data Provider for asort tests

public static asortProvider() : array<string|int, mixed>
Return values
array<string|int, mixed>

compareProvider()

Data Provider for compare tests

public static compareProvider() : array<string|int, mixed>
Return values
array<string|int, mixed>

natsortProvider()

Data provider for testNatsort()

public static natsortProvider() : array<string|int, mixed>
Return values
array<string|int, mixed>

sortProvider()

Data Provider for sort tests

public static sortProvider() : array<string|int, mixed>
Return values
array<string|int, mixed>

testAsort()

Test asort function

public testAsort(array<string|int, mixed> $test, array<string|int, mixed> $expected) : void
Parameters
$test : array<string|int, mixed>

Test data

$expected : array<string|int, mixed>

Expected result

Tags
dataProvider

asortProvider

Return values
void

testCompare()

Test compare function

public testCompare(array<string|int, mixed> $test, int $expected) : void
Parameters
$test : array<string|int, mixed>

Test data

$expected : int

Expected result

Tags
dataProvider

compareProvider

Return values
void

testNatsort()

Test natsort function

public testNatsort(array<string|int, mixed> $test, array<string|int, mixed> $expected) : void
Parameters
$test : array<string|int, mixed>

Test data

$expected : array<string|int, mixed>

Expected result

Tags
dataProvider

natsortProvider

Return values
void

testSort()

Test sort function

public testSort(array<string|int, mixed> $test, array<string|int, mixed> $expected) : void
Parameters
$test : array<string|int, mixed>

Test data

$expected : array<string|int, mixed>

Expected result

Tags
dataProvider

sortProvider

Return values
void

createSorter()

Create sorter

protected createSorter(string $locale[, bool $respectLocale = false ]) : Sorter
Parameters
$locale : string

Locale

$respectLocale : bool = false

Does respect locale

Return values
Sorter

getSorterForTest()

Get sorter for current test

protected getSorterForTest(array<string|int, mixed> $testCase) : Sorter
Parameters
$testCase : array<string|int, mixed>

Test definition

Return values
Sorter

Search results