1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-30 03:30:17 +02:00

[task/session-tests] Added tests for the session class.

Two first simple tests to check functionality of session_begin and
session_create.

Added a mock class for the cache as well as a subclass of session
which has its cookie handling function mocked out to avoid header
sending problems.

PHPBB3-9732
This commit is contained in:
Nils Adermann
2011-01-04 17:14:36 +01:00
parent ba5c7d8e63
commit 74f537e89d
8 changed files with 344 additions and 1 deletions

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8" ?>
<dataset>
<table name="phpbb_users">
<column>user_id</column>
<column>username_clean</column>
<row>
<value>1</value>
<value>anonymous</value>
</row>
<row>
<value>3</value>
<value>foo</value>
</row>
<row>
<value>4</value>
<value>bar</value>
</row>
</table>
</dataset>

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8" ?>
<dataset>
<table name="phpbb_users">
<column>user_id</column>
<column>username_clean</column>
<row>
<value>1</value>
<value>anonymous</value>
</row>
<row>
<value>3</value>
<value>foo</value>
</row>
<row>
<value>4</value>
<value>bar</value>
</row>
</table>
<table name="phpbb_sessions">
<column>session_id</column>
<column>session_user_id</column>
<column>session_ip</column>
<column>session_browser</column>
<row>
<value>anon_session</value>
<value>1</value>
<value>127.0.0.1</value>
<value>anonymous user agent</value>
</row>
<row>
<value>bar_session</value>
<value>4</value>
<value>127.0.0.1</value>
<value>user agent</value>
</row>
</table>
</dataset>