MediaWiki REL1_31
|
PHP Unit tests for MemoizedCallable class. More...
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. | |
PHP Unit tests for MemoizedCallable class.
Definition at line 27 of file MemoizedCallableTest.php.
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 52 of file MemoizedCallableTest.php.
MemoizedCallableTest::testInvokeVariadic | ( | ) |
Definition at line 71 of file MemoizedCallableTest.php.
MemoizedCallableTest::testMemoizedClosure | ( | ) |
Closure names should be distinct.
Definition at line 103 of file MemoizedCallableTest.php.
MemoizedCallableTest::testNonScalarArguments | ( | ) |
non-scalar argument InvalidArgumentException
Definition at line 130 of file MemoizedCallableTest.php.
MemoizedCallableTest::testNotCallable | ( | ) |
must be an instance of callable InvalidArgumentException
Definition at line 139 of file MemoizedCallableTest.php.
MemoizedCallableTest::testReturnValuePassedThrough | ( | ) |
The memoized callable should relate inputs to outputs in the same way as the original underlying callable.
Definition at line 35 of file MemoizedCallableTest.php.
References any.
MemoizedCallableTest::testShortcutMethod | ( | ) |
Definition at line 82 of file MemoizedCallableTest.php.
References MemoizedCallable\call().
MemoizedCallableTest::testTTLMaxMin | ( | ) |
Outlier TTL values should be coerced to range 1 - 86400.
Definition at line 92 of file MemoizedCallableTest.php.