4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler;
14 use PHPUnit\Framework\TestCase;
15 use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeSessionHandler;
18 * Test class for NativeSessionHandler.
20 * @author Drak <drak@zikula.org>
22 * @runTestsInSeparateProcesses
23 * @preserveGlobalState disabled
25 class NativeSessionHandlerTest extends TestCase
27 public function testConstruct()
29 $handler = new NativeSessionHandler();
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);
37 $this->assertTrue($handler instanceof \SessionHandler);
38 $this->assertTrue($handler instanceof NativeSessionHandler);