8000 MockArraySessionStorageTest: added clear() method tests · symfony/symfony@44f67af · GitHub
[go: up one dir, main page]

Skip to content

Commit 44f67af

Browse files
committed
MockArraySessionStorageTest: added clear() method tests
1 parent 80af083 commit 44f67af

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockArraySessionStorageTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,21 @@ public function testGetId()
9797
$this->assertNotEquals('', $this->storage->getId());
9898
}
9999

100+
public function testClearClearsBags()
101+
{
102+
$this->storage->clear();
103+
104+
$this->assertSame(array(), $this->storage->getBag('attributes')->all());
105+
$this->assertSame(array(), $this->storage->getBag('flashes')->peekAll());
106+
}
107+
108+
public function testClearStartsSession()
109+
{
110+
$this->storage->clear();
111+
112+
$this->assertTrue($this->storage->isStarted());
113+
}
114+
100115
/**
101116
* @expectedException \RuntimeException
102117
*/

0 commit comments

Comments
 (0)
0