public function MongoDbSessionHandlerTest::testDestroy in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/http-foundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php \Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler\MongoDbSessionHandlerTest::testDestroy()
File
- vendor/
symfony/ http-foundation/ Tests/ Session/ Storage/ Handler/ MongoDbSessionHandlerTest.php, line 205
Class
- MongoDbSessionHandlerTest
- @author Markus Bachmann <markus.bachmann@bachi.biz>
Namespace
Symfony\Component\HttpFoundation\Tests\Session\Storage\HandlerCode
public function testDestroy() {
$collection = $this
->createMongoCollectionMock();
$this->mongo
->expects($this
->once())
->method('selectCollection')
->with($this->options['database'], $this->options['collection'])
->will($this
->returnValue($collection));
$collection
->expects($this
->once())
->method('remove')
->with(array(
$this->options['id_field'] => 'foo',
));
$this
->assertTrue($this->storage
->destroy('foo'));
}