Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 39 and 310] [Versions 39 and 311] [Versions 39 and 400] [Versions 39 and 401] [Versions 39 and 402] [Versions 39 and 403]

Redis cache test. If you wish to use these unit tests all you need to do is add the following definition to your config.php file.

Copyright: 2018 Catalyst IT Australia {@link http://www.catalyst-au.net}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 292 lines (11 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 2 files
 cache/stores/redis/lib.php
 cache/tests/fixtures/stores.php

Defines 1 class


Class: cachestore_redis_compressor_test  - X-Ref

Redis cache test - compressor settings.

setUp()   X-Ref
Test set up


create_store($compressor, $serializer)   X-Ref
Create a cachestore.

param: int $compressor
param: int $serializer
return: cachestore_redis

test_it_can_miss_one()   X-Ref
It misses a value.


test_it_can_miss_many()   X-Ref
It misses many values.


test_it_can_miss_some()   X-Ref
It misses some values.


provider_for_test_it_works_with_different_types()   X-Ref
A provider for test_works_with_different_types

return: array

test_it_works_with_different_types($key, $value)   X-Ref
It works with different types.

param: string $key
param: mixed $value

test_it_works_with_different_types_for_many()   X-Ref
Test it works with different types for many.


provider_for_tests_setget()   X-Ref
Provider for set/get combination tests.

return: array

test_it_can_use_getset($name, $serializer, $compressor, $rawexpected1, $rawexpected2)   X-Ref
Test we can use get and set with all combinations.

param: string $name
param: int $serializer
param: int $compressor
param: string $rawexpected1
param: string $rawexpected2

test_it_can_use_getsetmany($name, $serializer, $compressor, $rawexpected1, $rawexpected2)   X-Ref
Test we can use get and set many with all combinations.

param: string $name
param: int $serializer
param: int $compressor
param: string $rawexpected1
param: string $rawexpected2