MediaWiki REL1_30
MemoizedCallableTest Class Reference

PHP Unit tests for MemoizedCallable class. More...

Inheritance diagram for MemoizedCallableTest:
Collaboration diagram for MemoizedCallableTest:

Public Member Functions

 testCallableMemoized ()
 Consecutive calls to the memoized callable with the same arguments should result in just one invocation of the underlying callable.
 
 testInvokeVariadic ()
 MemoizedCallable::invoke.
 
 testMemoizedClosure ()
 Closure names should be distinct.
 
 testNonScalarArguments ()
 non-scalar argument InvalidArgumentException
 
 testNotCallable ()
 must be an instance of callable InvalidArgumentException
 
 testReturnValuePassedThrough ()
 The memoized callable should relate inputs to outputs in the same way as the original underlying callable.
 
 testShortcutMethod ()
 MemoizedCallable::call.
 
 testTTLMaxMin ()
 Outlier TTL values should be coerced to range 1 - 86400.
 

Detailed Description

PHP Unit tests for MemoizedCallable class.

MemoizedCallable

Definition at line 27 of file MemoizedCallableTest.php.

Member Function Documentation

◆ testCallableMemoized()

MemoizedCallableTest::testCallableMemoized ( )

Consecutive calls to the memoized callable with the same arguments should result in just one invocation of the underlying callable.

@requires function apc_store/apcu_store

Definition at line 50 of file MemoizedCallableTest.php.

◆ testInvokeVariadic()

MemoizedCallableTest::testInvokeVariadic ( )

◆ testMemoizedClosure()

MemoizedCallableTest::testMemoizedClosure ( )

Closure names should be distinct.

Definition at line 101 of file MemoizedCallableTest.php.

◆ testNonScalarArguments()

MemoizedCallableTest::testNonScalarArguments ( )

non-scalar argument InvalidArgumentException

Definition at line 128 of file MemoizedCallableTest.php.

◆ testNotCallable()

MemoizedCallableTest::testNotCallable ( )

must be an instance of callable InvalidArgumentException

Definition at line 137 of file MemoizedCallableTest.php.

◆ testReturnValuePassedThrough()

MemoizedCallableTest::testReturnValuePassedThrough ( )

The memoized callable should relate inputs to outputs in the same way as the original underlying callable.

Definition at line 33 of file MemoizedCallableTest.php.

References any.

◆ testShortcutMethod()

MemoizedCallableTest::testShortcutMethod ( )

◆ testTTLMaxMin()

MemoizedCallableTest::testTTLMaxMin ( )

Outlier TTL values should be coerced to range 1 - 86400.

Definition at line 90 of file MemoizedCallableTest.php.


The documentation for this class was generated from the following file: