use Wikimedia\TestingAccessWrapper;
-class WANObjectCacheTest extends PHPUnit_Framework_TestCase {
+class WANObjectCacheTest extends PHPUnit_Framework_TestCase {
/** @var WANObjectCache */
private $cache;
/**@var BagOStuff */
$priorValue = null;
$priorAsOf = null;
$wasSet = 0;
- $func = function( $old, &$ttl, &$opts, $asOf )
+ $func = function ( $old, &$ttl, &$opts, $asOf )
use ( &$wasSet, &$priorValue, &$priorAsOf, $value )
{
++$wasSet;
$value = wfRandomString();
$calls = 0;
- $func = function() use ( &$calls, $value, $cache, $key ) {
+ $func = function () use ( &$calls, $value, $cache, $key ) {
++$calls;
// Immediately kill any mutex rather than waiting a second
$cache->delete( $cache::MUTEX_KEY_PREFIX . $key );
$value = wfRandomString();
$calls = 0;
- $func = function( $oldValue, &$ttl, &$setOpts ) use ( &$calls, $value, $cache, $key ) {
+ $func = function ( $oldValue, &$ttl, &$setOpts ) use ( &$calls, $value, $cache, $key ) {
++$calls;
$setOpts['since'] = microtime( true ) - 10;
// Immediately kill any mutex rather than waiting a second
$busyValue = wfRandomString();
$calls = 0;
- $func = function() use ( &$calls, $value, $cache, $key ) {
+ $func = function () use ( &$calls, $value, $cache, $key ) {
++$calls;
// Immediately kill any mutex rather than waiting a second
$cache->delete( $cache::MUTEX_KEY_PREFIX . $key );
$value = wfRandomString();
$wasSet = 0;
- $func = function( $old, &$ttl ) use ( &$wasSet, $value ) {
+ $func = function ( $old, &$ttl ) use ( &$wasSet, $value ) {
++$wasSet;
return $value;
};