Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9a5fc65

Browse filesBrowse files
author
Drak
committed
[HttpFoundation] Add more tests.
1 parent 68074a2 commit 9a5fc65
Copy full SHA for 9a5fc65

File tree

Expand file treeCollapse file tree

1 file changed

+40
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+40
-0
lines changed

‎tests/Symfony/Tests/Component/HttpFoundation/Session/Storage/Proxy/AbstractProxyTest.php

Copy file name to clipboardExpand all lines: tests/Symfony/Tests/Component/HttpFoundation/Session/Storage/Proxy/AbstractProxyTest.php
+40Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,44 @@ public function testSetActive()
8989
$this->proxy->setActive(false);
9090
$this->assertFalse($this->proxy->isActive());
9191
}
92+
93+
/**
94+
* @runInSeparateProcess
95+
*/
96+
public function testName()
97+
{
98+
$this->assertEquals(session_name(), $this->proxy->getName());
99+
$this->proxy->setName('foo');
100+
$this->assertEquals('foo', $this->proxy->getName());
101+
$this->assertEquals(session_name(), $this->proxy->getName());
102+
}
103+
104+
/**
105+
* @expectedException \LogicException
106+
*/
107+
public function testNameException()
108+
{
109+
$this->proxy->setActive(true);
110+
$this->proxy->setName('foo');
111+
}
112+
113+
/**
114+
* @runInSeparateProcess
115+
*/
116+
public function testId()
117+
{
118+
$this->assertEquals(session_id(), $this->proxy->getId());
119+
$this->proxy->setId('foo');
120+
$this->assertEquals('foo', $this->proxy->getId());
121+
$this->assertEquals(session_id(), $this->proxy->getId());
122+
}
123+
124+
/**
125+
* @expectedException \LogicException
126+
*/
127+
public function testIdException()
128+
{
129+
$this->proxy->setActive(true);
130+
$this->proxy->setId('foo');
131+
}
92132
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.