forked from symfony/symfony
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[HttpFoundation] Add and relocate tests.
- Loading branch information
Drak
committed
Mar 14, 2012
1 parent
88b1170
commit 1308312
Showing
12 changed files
with
203 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
69 changes: 69 additions & 0 deletions
69
tests/Symfony/Tests/Component/HttpFoundation/Session/Storage/Proxy/AbstractProxyTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<?php | ||
|
||
namespace Symfony\Tests\Component\HttpFoundation\Session\Storage\Proxy; | ||
|
||
use Symfony\Component\HttpFoundation\Session\Storage\Proxy\AbstractProxy; | ||
|
||
class ConcreteProxy extends AbstractProxy | ||
{ | ||
|
||
} | ||
|
||
/** | ||
* Test class for AbstractProxy. | ||
* | ||
* @runTestsInSeparateProcesses | ||
*/ | ||
class AbstractProxyTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
/** | ||
* @var AbstractProxy | ||
*/ | ||
protected $proxy; | ||
|
||
protected function setUp() | ||
{ | ||
$this->proxy = new ConcreteProxy; | ||
} | ||
|
||
protected function tearDown() | ||
{ | ||
$this->proxy = null; | ||
} | ||
|
||
public function testGetSaveHandlerName() | ||
{ | ||
$this->markTestIncomplete( | ||
'This test has not been implemented yet.' | ||
); | ||
} | ||
|
||
public function testIsSessionHandlerInterface() | ||
{ | ||
$this->markTestIncomplete( | ||
'This test has not been implemented yet.' | ||
); | ||
} | ||
|
||
public function testIsWrapper() | ||
{ | ||
$this->markTestIncomplete( | ||
'This test has not been implemented yet.' | ||
); | ||
} | ||
|
||
public function testIsActive() | ||
{ | ||
$this->markTestIncomplete( | ||
'This test has not been implemented yet.' | ||
); | ||
} | ||
|
||
public function testSetActive() | ||
{ | ||
$this->markTestIncomplete( | ||
'This test has not been implemented yet.' | ||
); | ||
} | ||
|
||
} |
34 changes: 34 additions & 0 deletions
34
tests/Symfony/Tests/Component/HttpFoundation/Session/Storage/Proxy/NativeProxyPHP53Test.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
namespace Symfony\Tests\Component\HttpFoundation\Session\Storage\Proxy; | ||
|
||
use Symfony\Component\HttpFoundation\Session\Storage\Proxy\NativeProxy; | ||
use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler; | ||
|
||
/** | ||
* Test class for NativeProxy. | ||
* | ||
* @runTestsInSeparateProcesses | ||
*/ | ||
class NativeProxyPHP53Test extends \PHPUnit_Framework_TestCase | ||
{ | ||
protected function setUp() | ||
{ | ||
if (version_compare(phpversion(), '5.4.0', '>=')) { | ||
$this->markTestSkipped('Test skipped, only for PHP 5.3'); | ||
} | ||
} | ||
|
||
public function testIsWrapper() | ||
{ | ||
$proxy = new NativeProxy(new NativeFileSessionHandler()); | ||
$this->assertFalse($proxy->isWrapper()); | ||
} | ||
|
||
public function testGetSaveHandlerName() | ||
{ | ||
$name = ini_get('session.save_handler'); | ||
$proxy = new NativeProxy(new NativeFileSessionHandler()); | ||
$this->assertEquals($name, $proxy->getSaveHandlerName()); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
tests/Symfony/Tests/Component/HttpFoundation/Session/Storage/Proxy/NativeProxyPHP54Test.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
namespace Symfony\Tests\Component\HttpFoundation\Session\Storage\Proxy; | ||
|
||
use Symfony\Component\HttpFoundation\Session\Storage\Proxy\NativeProxy; | ||
use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler; | ||
|
||
/** | ||
* Test class for NativeProxy. | ||
* | ||
* @runTestsInSeparateProcesses | ||
*/ | ||
class NativeProxyPHP54Test extends \PHPUnit_Framework_TestCase | ||
{ | ||
protected function setUp() | ||
{ | ||
if (version_compare(phpversion(), '5.4.0', '<')) { | ||
$this->markTestSkipped('Test skipped, only for PHP 5.4'); | ||
} | ||
} | ||
|
||
/** | ||
* @expectedException \InvalidArgumentException | ||
*/ | ||
public function testConstructor() | ||
{ | ||
$proxy = new NativeProxy(new NativeFileSessionHandler()); | ||
$this->assertTrue($proxy->isWrapper()); | ||
} | ||
} |
70 changes: 70 additions & 0 deletions
70
.../Symfony/Tests/Component/HttpFoundation/Session/Storage/Proxy/SessionHandlerProxyTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<?php | ||
|
||
namespace Symfony\Tests\Component\HttpFoundation\Session\Storage\Proxy; | ||
|
||
use Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy; | ||
use Symfony\Component\HttpFoundation\Session\Storage\Handler\NullSessionHandler; | ||
|
||
/** | ||
* @runTestsInSeparateProcesses | ||
*/ | ||
class SessionHandlerProxyTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
/** | ||
* @var SessionHandlerProxy | ||
*/ | ||
protected $proxy; | ||
|
||
protected function setUp() | ||
{ | ||
$this->proxy = new SessionHandlerProxy(new NullSessionHandler()); | ||
} | ||
|
||
protected function tearDown() | ||
{ | ||
$this->proxy = null; | ||
} | ||
|
||
public function testOpen() | ||
{ | ||
$this->markTestIncomplete( | ||
'This test has not been implemented yet.' | ||
); | ||
} | ||
|
||
public function testClose() | ||
{ | ||
$this->markTestIncomplete( | ||
'This test has not been implemented yet.' | ||
); | ||
} | ||
|
||
public function testRead() | ||
{ | ||
$this->markTestIncomplete( | ||
'This test has not been implemented yet.' | ||
); | ||
} | ||
|
||
public function testWrite() | ||
{ | ||
$this->markTestIncomplete( | ||
'This test has not been implemented yet.' | ||
); | ||
} | ||
|
||
public function testDestroy() | ||
{ | ||
$this->markTestIncomplete( | ||
'This test has not been implemented yet.' | ||
); | ||
} | ||
|
||
public function testGc() | ||
{ | ||
$this->markTestIncomplete( | ||
'This test has not been implemented yet.' | ||
); | ||
} | ||
|
||
} |
File renamed without changes.