Yaffs site version 1.1
[yaffs-website] / vendor / symfony / http-foundation / Tests / Session / Storage / Handler / NativeSessionHandlerTest.php
1 <?php
2
3 /*
4  * This file is part of the Symfony package.
5  *
6  * (c) Fabien Potencier <fabien@symfony.com>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler;
13
14 use PHPUnit\Framework\TestCase;
15 use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeSessionHandler;
16
17 /**
18  * Test class for NativeSessionHandler.
19  *
20  * @author Drak <drak@zikula.org>
21  *
22  * @runTestsInSeparateProcesses
23  * @preserveGlobalState disabled
24  */
25 class NativeSessionHandlerTest extends TestCase
26 {
27     public function testConstruct()
28     {
29         $handler = new NativeSessionHandler();
30
31         // note for PHPUnit optimisers - the use of assertTrue/False
32         // here is deliberate since the tests do not require the classes to exist - drak
33         if (\PHP_VERSION_ID < 50400) {
34             $this->assertFalse($handler instanceof \SessionHandler);
35             $this->assertTrue($handler instanceof NativeSessionHandler);
36         } else {
37             $this->assertTrue($handler instanceof \SessionHandler);
38             $this->assertTrue($handler instanceof NativeSessionHandler);
39         }
40     }
41 }