aboutsummaryrefslogtreecommitdiffstats
path: root/tests/session
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2011-03-23 20:30:23 -0400
committerOleg Pudeyev <oleg@bsdpower.com>2011-03-23 20:30:23 -0400
commitdf6ce22fa300a9721d20f0f0f770d0d721e43164 (patch)
treeb1d4fb771cbe3314e2e7d2d02d1dfb8ddaf7597b /tests/session
parentc53c255c6402f17f6e47dcf30a87f49e082291ca (diff)
parentd36f78b9f1c7fc0c52a36d95510be1d8e2361f5d (diff)
downloadforums-df6ce22fa300a9721d20f0f0f770d0d721e43164.tar
forums-df6ce22fa300a9721d20f0f0f770d0d721e43164.tar.gz
forums-df6ce22fa300a9721d20f0f0f770d0d721e43164.tar.bz2
forums-df6ce22fa300a9721d20f0f0f770d0d721e43164.tar.xz
forums-df6ce22fa300a9721d20f0f0f770d0d721e43164.zip
Merge branch 'ticket/bantu/10082' into develop-olympus
* ticket/bantu/10082: [ticket/10082] session_id is CHAR(32) not VARCHAR(32), so give them a CHAR(32).
Diffstat (limited to 'tests/session')
-rw-r--r--tests/session/continue_test.php14
-rw-r--r--tests/session/fixtures/sessions_full.xml4
2 files changed, 11 insertions, 7 deletions
diff --git a/tests/session/continue_test.php b/tests/session/continue_test.php
index 3080121978..6737562a0a 100644
--- a/tests/session/continue_test.php
+++ b/tests/session/continue_test.php
@@ -19,21 +19,25 @@ class phpbb_session_continue_test extends phpbb_database_test_case
static public function session_begin_attempts()
{
+ // The session_id field is defined as CHAR(32) in the database schema.
+ // Thus the data we put in session_id fields has to have a length of 32 characters on stricter DBMSes.
+ // Thus we fill those strings up with zeroes until they have a string length of 32.
+
return array(
array(
- 'bar_session', '4', 'user agent', '127.0.0.1',
+ 'bar_session000000000000000000000', '4', 'user agent', '127.0.0.1',
array(
- array('session_id' => 'anon_session', 'session_user_id' => 1),
- array('session_id' => 'bar_session', 'session_user_id' => 4),
+ array('session_id' => 'anon_session00000000000000000000', 'session_user_id' => 1),
+ array('session_id' => 'bar_session000000000000000000000', 'session_user_id' => 4),
),
array(),
'If a request comes with a valid session id with matching user agent and IP, no new session should be created.',
),
array(
- 'anon_session', '4', 'user agent', '127.0.0.1',
+ 'anon_session00000000000000000000', '4', 'user agent', '127.0.0.1',
array(
array('session_id' => '__new_session_id__', 'session_user_id' => 1), // use generated SID
- array('session_id' => 'bar_session', 'session_user_id' => 4),
+ array('session_id' => 'bar_session000000000000000000000', 'session_user_id' => 4),
),
array(
'u' => array('1', null),
diff --git a/tests/session/fixtures/sessions_full.xml b/tests/session/fixtures/sessions_full.xml
index 4559a08c55..bf6fc65997 100644
--- a/tests/session/fixtures/sessions_full.xml
+++ b/tests/session/fixtures/sessions_full.xml
@@ -22,13 +22,13 @@
<column>session_ip</column>
<column>session_browser</column>
<row>
- <value>anon_session</value>
+ <value>anon_session00000000000000000000</value>
<value>1</value>
<value>127.0.0.1</value>
<value>anonymous user agent</value>
</row>
<row>
- <value>bar_session</value>
+ <value>bar_session000000000000000000000</value>
<value>4</value>
<value>127.0.0.1</value>
<value>user agent</value>