aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/session/CookieSessionProviderTest.php
diff options
context:
space:
mode:
authorBrad Jorsch <bjorsch@wikimedia.org>2016-01-29 20:09:57 -0500
committerAnomie <bjorsch@wikimedia.org>2016-02-03 21:45:18 +0000
commit25dbd91513f1e55ee2ae9f01ef6abce648376a32 (patch)
treeb3479b129c7af9a59326ccf1a30aa9e93bada75e /tests/phpunit/includes/session/CookieSessionProviderTest.php
parent2257fe42288cca06376e5caf45aa32da9d0216cf (diff)
downloadmediawikicore-25dbd91513f1e55ee2ae9f01ef6abce648376a32.tar.gz
mediawikicore-25dbd91513f1e55ee2ae9f01ef6abce648376a32.zip
Clean up after Ie161e0f
Ie161e0f was done in a hurry, and so didn't do things in the best ways. This introduces a new "CachedBagOStuff" that transparently handles all the logic that had been copy-pasted all over in Ie161e0f. The differences between CachedBagOStuff and MultiWriteBagOStuff are: * CachedBagOStuff supports only one "backend". * There's a flag for writes to only go to the in-memory cache. * The in-memory cache is always updated. * Locks go to the backend cache (with MultiWriteBagOStuff, it would wind up going to the HashBagOStuff used for the in-memory cache). Change-Id: Iea494729bd2e8c6c5ab8facf4c241232e31e8215
Diffstat (limited to 'tests/phpunit/includes/session/CookieSessionProviderTest.php')
-rw-r--r--tests/phpunit/includes/session/CookieSessionProviderTest.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/phpunit/includes/session/CookieSessionProviderTest.php b/tests/phpunit/includes/session/CookieSessionProviderTest.php
index e5df45880251..9ba67df2441c 100644
--- a/tests/phpunit/includes/session/CookieSessionProviderTest.php
+++ b/tests/phpunit/includes/session/CookieSessionProviderTest.php
@@ -352,7 +352,7 @@ class CookieSessionProviderTest extends MediaWikiTestCase {
$provider->setManager( SessionManager::singleton() );
$sessionId = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa';
- $store = new \HashBagOStuff();
+ $store = new TestBagOStuff();
$user = User::newFromName( 'UTSysop' );
$anon = new User;
@@ -365,7 +365,6 @@ class CookieSessionProviderTest extends MediaWikiTestCase {
'idIsSafe' => true,
) ),
$store,
- $store,
new \Psr\Log\NullLogger(),
10
);
@@ -451,8 +450,7 @@ class CookieSessionProviderTest extends MediaWikiTestCase {
'persisted' => true,
'idIsSafe' => true,
) ),
- new \EmptyBagOStuff(),
- new \EmptyBagOStuff(),
+ new TestBagOStuff(),
new \Psr\Log\NullLogger(),
10
);
@@ -544,7 +542,7 @@ class CookieSessionProviderTest extends MediaWikiTestCase {
$provider->setManager( SessionManager::singleton() );
$sessionId = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa';
- $store = new \HashBagOStuff();
+ $store = new TestBagOStuff();
$user = User::newFromName( 'UTSysop' );
$anon = new User;
@@ -557,7 +555,6 @@ class CookieSessionProviderTest extends MediaWikiTestCase {
'idIsSafe' => true,
) ),
$store,
- $store,
new \Psr\Log\NullLogger(),
10
);