MediaWiki  1.33.0
MemoizedCallableTest Class Reference

PHPUnit 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. More...
 
 testInvokeVariadic ()
 MemoizedCallable::invoke. More...
 
 testMemoizedClosure ()
 Closure names should be distinct. More...
 
 testNonScalarArguments ()
 non-scalar argument InvalidArgumentException More...
 
 testNotCallable ()
 must be an instance of callable InvalidArgumentException More...
 
 testReturnValuePassedThrough ()
 The memoized callable should relate inputs to outputs in the same way as the original underlying callable. More...
 
 testShortcutMethod ()
 MemoizedCallable::call. More...
 
 testTTLMaxMin ()
 Outlier TTL values should be coerced to range 1 - 86400. More...
 

Detailed Description

PHPUnit tests for MemoizedCallable class.

MemoizedCallable

Definition at line 6 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 extension apcu

Definition at line 31 of file MemoizedCallableTest.php.

References class.

◆ testInvokeVariadic()

MemoizedCallableTest::testInvokeVariadic ( )

◆ testMemoizedClosure()

MemoizedCallableTest::testMemoizedClosure ( )

Closure names should be distinct.

Definition at line 82 of file MemoizedCallableTest.php.

References MemoizedCallable\invokeArgs().

◆ testNonScalarArguments()

MemoizedCallableTest::testNonScalarArguments ( )

non-scalar argument InvalidArgumentException

Definition at line 109 of file MemoizedCallableTest.php.

◆ testNotCallable()

MemoizedCallableTest::testNotCallable ( )

must be an instance of callable InvalidArgumentException

Definition at line 118 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 14 of file MemoizedCallableTest.php.

References any, and class.

◆ testShortcutMethod()

MemoizedCallableTest::testShortcutMethod ( )

◆ testTTLMaxMin()

MemoizedCallableTest::testTTLMaxMin ( )

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

Definition at line 71 of file MemoizedCallableTest.php.


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