]
] );
$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();
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 );
] );
$expect = [
- 'Foo' => [],
- 'Bar' => [ 'X', 'Bar1', 3 => 'Bar2' ],
- 'Quux' => [ 'Quux' ],
- 'Baz' => [],
+ 'Foo' => null,
+ 'Bar' => null,
+ 'Quux' => null,
+ 'Baz' => null,
];
$this->assertEquals( $expect, $manager->getVaryHeaders() );