[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/cache/tests/ -> cache_test.php (summary)

PHPunit tests for the cache API This file is part of Moodle's cache API, affectionately called MUC. It contains the components that are requried in order to use caching.

Copyright: 2012 Sam Hemelryk
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 2097 lines (94 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

core_cache_testcase:: (42 methods):
  setUp()
  tearDownAfterClass()
  get_expected_application_cache_store()
  test_cache_config()
  test_windows_nasty_keys()
  test_default_application_cache()
  test_default_session_cache()
  test_default_request_cache()
  test_on_cache_without_store()
  run_on_cache()
  test_definition_data_loader()
  test_definition_overridden_loader()
  test_definition_mappings_only()
  test_definition()
  test_definition_simplekeys()
  test_application_ttl_negative()
  test_application_ttl_positive()
  test_session_ttl_positive()
  test_application_manual_locking()
  test_application_event_invalidation()
  test_session_event_invalidation()
  test_application_definition_invalidation()
  test_session_definition_invalidation()
  test_distributed_application_event_invalidation()
  test_application_event_purge()
  test_session_event_purge()
  test_application_definition_purge()
  test_alt_cache_path()
  test_disable_stores()
  test_disable()
  test_multiple_application_loaders()
  test_multiple_session_loaders()
  test_session_cache_switch_user()
  test_session_cache_switch_user_application_mapping()
  test_dual_session_caches()
  test_session_cache_switch_user_multiple()
  test_application_locking()
  test_purge_stores_used_by_definition()
  test_purge_routines()
  test_defaults_support_searching()
  test_static_acceleration()
  test_performance_debug()


Class: core_cache_testcase  - X-Ref

PHPunit tests for the cache API

setUp()   X-Ref
Set things back to the default before each test.


tearDownAfterClass()   X-Ref
Final task is to reset the cache system


get_expected_application_cache_store()   X-Ref
Returns the expected application cache store.

return: string

test_cache_config()   X-Ref
Tests cache configuration


test_windows_nasty_keys()   X-Ref
Tests for cache keys that would break on windows.


test_default_application_cache()   X-Ref
Tests the default application cache


test_default_session_cache()   X-Ref
Tests the default session cache


test_default_request_cache()   X-Ref
Tests the default request cache


test_on_cache_without_store()   X-Ref
Tests using a cache system when there are no stores available (who knows what the admin did to achieve this).


run_on_cache(cache_loader $cache)   X-Ref
Runs a standard series of access and use tests on a cache instance.

This function is great because we can use it to ensure all of the loaders perform exactly the same way.

param: cache_loader $cache

test_definition_data_loader()   X-Ref
Tests a definition using a data loader


test_definition_overridden_loader()   X-Ref
Tests a definition using an overridden loader


test_definition_mappings_only()   X-Ref
Test the mappingsonly setting.


test_definition()   X-Ref
Test a very basic definition.


test_definition_simplekeys()   X-Ref
Test a definition using the simple keys.


test_application_ttl_negative()   X-Ref
Test a negative TTL on an application cache.


test_application_ttl_positive()   X-Ref
Test a positive TTL on an application cache.


test_session_ttl_positive()   X-Ref
Test a negative TTL on an session cache.


test_application_manual_locking()   X-Ref
Tests manual locking operations on an application cache


test_application_event_invalidation()   X-Ref
Tests application cache event invalidation


test_session_event_invalidation()   X-Ref
Tests session cache event invalidation


test_application_definition_invalidation()   X-Ref
Tests application cache definition invalidation


test_session_definition_invalidation()   X-Ref
Tests session cache definition invalidation


test_distributed_application_event_invalidation()   X-Ref
Tests application cache event invalidation over a distributed setup.


test_application_event_purge()   X-Ref
Tests application cache event purge


test_session_event_purge()   X-Ref
Tests session cache event purge


test_application_definition_purge()   X-Ref
Tests application cache definition purge


test_alt_cache_path()   X-Ref
Test the use of an alt path.
If we can generate a config instance we are done :)


test_disable_stores()   X-Ref
Test disabling the cache stores.


test_disable()   X-Ref
Test disabling the cache.


test_multiple_application_loaders()   X-Ref
Test that multiple application loaders work ok.


test_multiple_session_loaders()   X-Ref
Test that multiple application loaders work ok.


test_session_cache_switch_user()   X-Ref
Test switching users with session caches.


test_session_cache_switch_user_application_mapping()   X-Ref
Test switching users with session caches.


test_dual_session_caches()   X-Ref
Test two session caches being used at once to confirm collisions don't occur.


test_session_cache_switch_user_multiple()   X-Ref
Test multiple session caches when switching user.


test_application_locking()   X-Ref
Test application locking.


test_purge_stores_used_by_definition()   X-Ref
Test the static cache_helper method purge_stores_used_by_definition.


test_purge_routines()   X-Ref
Test purge routines.


test_defaults_support_searching()   X-Ref
Test that the default stores all support searching.


test_static_acceleration()   X-Ref
No description

test_performance_debug()   X-Ref
No description



Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1