xref: /PHP-7.0/ext/session/tests/bug61470.phpt (revision b680ccb2)
1--TEST--
2Bug #61470 (session_regenerate_id() does not create session file)
3--SKIPIF--
4<?php include('skipif.inc'); ?>
5--INI--
6--FILE--
7<?php
8ob_start();
9ini_set('session.save_path', __DIR__);
10$path = ini_get('session.save_path') . '/sess_';
11session_start();
12// starts session & creates and locks file
13$file1 = $path . session_id();
14var_dump(is_file($file1));
15
16session_regenerate_id();
17// starts new session, but file is not create!
18$file2 = $path . session_id();
19var_dump(is_file($file2));
20
21// cleanup
22@unlink($file1);
23@unlink($file2);
24--EXPECT--
25bool(true)
26bool(true)
27
28