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 1308312

Browse filesBrowse files
author
Drak
committed
[HttpFoundation] Add and relocate tests.
1 parent 88b1170 commit 1308312
Copy full SHA for 1308312
Expand file treeCollapse file tree

12 files changed

+203
-0
lines changed
+69Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
<?php
2+
3+
namespace Symfony\Tests\Component\HttpFoundation\Session\Storage\Proxy;
4+
5+
use Symfony\Component\HttpFoundation\Session\Storage\Proxy\AbstractProxy;
6+
7+
class ConcreteProxy extends AbstractProxy
8+
{
9+
10+
}
11+
12+
/**
13+
* Test class for AbstractProxy.
14+
*
15+
* @runTestsInSeparateProcesses
16+
*/
17+
class AbstractProxyTest extends \PHPUnit_Framework_TestCase
18+
{
19+
/**
20+
* @var AbstractProxy
21+
*/
22+
protected $proxy;
23+
24+
protected function setUp()
25+
{
26+
$this->proxy = new ConcreteProxy;
27+
}
28+
29+
protected function tearDown()
30+
{
31+
$this->proxy = null;
32+
}
33+
34+
public function testGetSaveHandlerName()
35+
{
36+
$this->markTestIncomplete(
37+
'This test has not been implemented yet.'
38+
);
39+
}
40+
41+
public function testIsSessionHandlerInterface()
42+
{
43+
$this->markTestIncomplete(
44+
'This test has not been implemented yet.'
45+
);
46+
}
47+
48+
public function testIsWrapper()
49+
{
50+
$this->markTestIncomplete(
51+
'This test has not been implemented yet.'
52+
);
53+
}
54+
55+
public function testIsActive()
56+
{
57+
$this->markTestIncomplete(
58+
'This test has not been implemented yet.'
59+
);
60+
}
61+
62+
public function testSetActive()
63+
{
64+
$this->markTestIncomplete(
65+
'This test has not been implemented yet.'
66+
);
67+
}
68+
69+
}
+34Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
namespace Symfony\Tests\Component\HttpFoundation\Session\Storage\Proxy;
4+
5+
use Symfony\Component\HttpFoundation\Session\Storage\Proxy\NativeProxy;
6+
use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler;
7+
8+
/**
9+
* Test class for NativeProxy.
10+
*
11+
* @runTestsInSeparateProcesses
12+
*/
13+
class NativeProxyPHP53Test extends \PHPUnit_Framework_TestCase
14+
{
15+
protected function setUp()
16+
{
17+
if (version_compare(phpversion(), '5.4.0', '>=')) {
18+
$this->markTestSkipped('Test skipped, only for PHP 5.3');
19+
}
20+
}
21+
22+
public function testIsWrapper()
23+
{
24+
$proxy = new NativeProxy(new NativeFileSessionHandler());
25+
$this->assertFalse($proxy->isWrapper());
26+
}
27+
28+
public function testGetSaveHandlerName()
29+
{
30+
$name = ini_get('session.save_handler');
31+
$proxy = new NativeProxy(new NativeFileSessionHandler());
32+
$this->assertEquals($name, $proxy->getSaveHandlerName());
33+
}
34+
}
+30Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
3+
namespace Symfony\Tests\Component\HttpFoundation\Session\Storage\Proxy;
4+
5+
use Symfony\Component\HttpFoundation\Session\Storage\Proxy\NativeProxy;
6+
use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler;
7+
8+
/**
9+
* Test class for NativeProxy.
10+
*
11+
* @runTestsInSeparateProcesses
12+
*/
13+
class NativeProxyPHP54Test extends \PHPUnit_Framework_TestCase
14+
{
15+
protected function setUp()
16+
{
17+
if (version_compare(phpversion(), '5.4.0', '<')) {
18+
$this->markTestSkipped('Test skipped, only for PHP 5.4');
19+
}
20+
}
21+
22+
/**
23+
* @expectedException \InvalidArgumentException
24+
*/
25+
public function testConstructor()
26+
{
27+
$proxy = new NativeProxy(new NativeFileSessionHandler());
28+
$this->assertTrue($proxy->isWrapper());
29+
}
30+
}
+70Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<?php
2+
3+
namespace Symfony\Tests\Component\HttpFoundation\Session\Storage\Proxy;
4+
5+
use Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy;
6+
use Symfony\Component\HttpFoundation\Session\Storage\Handler\NullSessionHandler;
7+
8+
/**
9+
* @runTestsInSeparateProcesses
10+
*/
11+
class SessionHandlerProxyTest extends \PHPUnit_Framework_TestCase
12+
{
13+
/**
14+
* @var SessionHandlerProxy
15+
*/
16+
protected $proxy;
17+
18+
protected function setUp()
19+
{
20+
$this->proxy = new SessionHandlerProxy(new NullSessionHandler());
21+
}
22+
23+
protected function tearDown()
24+
{
25+
$this->proxy = null;
26+
}
27+
28+
public function testOpen()
29+
{
30+
$this->markTestIncomplete(
31+
'This test has not been implemented yet.'
32+
);
33+
}
34+
35+
public function testClose()
36+
{
37+
$this->markTestIncomplete(
38+
'This test has not been implemented yet.'
39+
);
40+
}
41+
42+
public function testRead()
43+
{
44+
$this->markTestIncomplete(
45+
'This test has not been implemented yet.'
46+
);
47+
}
48+
49+
public function testWrite()
50+
{
51+
$this->markTestIncomplete(
52+
'This test has not been implemented yet.'
53+
);
54+
}
55+
56+
public function testDestroy()
57+
{
58+
$this->markTestIncomplete(
59+
'This test has not been implemented yet.'
60+
);
61+
}
62+
63+
public function testGc()
64+
{
65+
$this->markTestIncomplete(
66+
'This test has not been implemented yet.'
67+
);
68+
}
69+
70+
}

0 commit comments

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