X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fsession%2FSessionManagerTest.php;h=3b4009ee966964c709860cfdedbd7d0afabb2255;hb=17d8a57bde68073290f4b548ad28658181a11d0e;hp=cd0867d2eff6c4bf229144e3cb5bf1a17f6d8f98;hpb=04d1aa3033f40a38d721f7f0e88b5bac440d2869;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/session/SessionManagerTest.php b/tests/phpunit/includes/session/SessionManagerTest.php index cd0867d2ef..3b4009ee96 100644 --- a/tests/phpunit/includes/session/SessionManagerTest.php +++ b/tests/phpunit/includes/session/SessionManagerTest.php @@ -34,7 +34,9 @@ class SessionManagerTest extends MediaWikiTestCase { ] ] ); $this->logger = new \TestLogger( false, function ( $m ) { - return substr( $m, 0, 15 ) === 'SessionBackend ' ? null : $m; + return ( strpos( $m, 'SessionBackend ' ) === 0 + || strpos( $m, 'SessionManager using store ' ) === 0 + ) ? null : $m; } ); $this->store = new TestBagOStuff(); @@ -259,14 +261,14 @@ class SessionManagerTest extends MediaWikiTestCase { try { $manager->getSessionForRequest( $request ); $this->fail( 'Expcected exception not thrown' ); - } catch ( \OverflowException $ex ) { + } catch ( SessionOverflowException $ex ) { $this->assertStringStartsWith( 'Multiple sessions for this request tied for top priority: ', $ex->getMessage() ); - $this->assertCount( 2, $ex->sessionInfos ); - $this->assertContains( $request->info1, $ex->sessionInfos ); - $this->assertContains( $request->info2, $ex->sessionInfos ); + $this->assertCount( 2, $ex->getSessionInfos() ); + $this->assertContains( $request->info1, $ex->getSessionInfos() ); + $this->assertContains( $request->info2, $ex->getSessionInfos() ); } $this->assertFalse( $request->unpersist1 ); $this->assertFalse( $request->unpersist2 );