public function WriteCheckSessionHandlerTest::testNonSkippedWrite in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-foundation/Tests/Session/Storage/Handler/WriteCheckSessionHandlerTest.php \Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler\WriteCheckSessionHandlerTest::testNonSkippedWrite()
File
- vendor/
symfony/ http-foundation/ Tests/ Session/ Storage/ Handler/ WriteCheckSessionHandlerTest.php, line 72
Class
- WriteCheckSessionHandlerTest
- @author Adrien Brault <adrien.brault@gmail.com>
Namespace
Symfony\Component\HttpFoundation\Tests\Session\Storage\HandlerCode
public function testNonSkippedWrite() {
$wrappedSessionHandlerMock = $this
->getMock('SessionHandlerInterface');
$writeCheckSessionHandler = new WriteCheckSessionHandler($wrappedSessionHandlerMock);
$wrappedSessionHandlerMock
->expects($this
->once())
->method('read')
->with('foo')
->will($this
->returnValue('bar'));
$wrappedSessionHandlerMock
->expects($this
->once())
->method('write')
->with('foo', 'baZZZ')
->will($this
->returnValue(true));
$this
->assertEquals('bar', $writeCheckSessionHandler
->read('foo'));
$this
->assertTrue($writeCheckSessionHandler
->write('foo', 'baZZZ'));
}