diff options
Diffstat (limited to 'tests/dbal')
-rw-r--r-- | tests/dbal/fixtures/styles.xml | 4 | ||||
-rw-r--r-- | tests/dbal/order_lower_test.php | 3 | ||||
-rw-r--r-- | tests/dbal/schema_test.php | 38 |
3 files changed, 38 insertions, 7 deletions
diff --git a/tests/dbal/fixtures/styles.xml b/tests/dbal/fixtures/styles.xml index 47b384c47f..36fc22a48f 100644 --- a/tests/dbal/fixtures/styles.xml +++ b/tests/dbal/fixtures/styles.xml @@ -7,7 +7,6 @@ <column>style_active</column> <column>template_id</column> <column>theme_id</column> - <column>imageset_id</column> <row> <value>1</value> <value>prosilver</value> @@ -15,7 +14,6 @@ <value>1</value> <value>1</value> <value>1</value> - <value>1</value> </row> <row> <value>2</value> @@ -24,7 +22,6 @@ <value>0</value> <value>2</value> <value>2</value> - <value>2</value> </row> <row> <value>3</value> @@ -33,7 +30,6 @@ <value>0</value> <value>3</value> <value>3</value> - <value>3</value> </row> </table> </dataset> diff --git a/tests/dbal/order_lower_test.php b/tests/dbal/order_lower_test.php index b50494d506..eaf5211508 100644 --- a/tests/dbal/order_lower_test.php +++ b/tests/dbal/order_lower_test.php @@ -35,7 +35,6 @@ class phpbb_dbal_order_lower_test extends phpbb_database_test_case 'style_active' => 1, 'template_id' => 1, 'theme_id' => 1, - 'imageset_id' => 1 ), array( 'style_id' => 3, @@ -44,7 +43,6 @@ class phpbb_dbal_order_lower_test extends phpbb_database_test_case 'style_active' => 0, 'template_id' => 3, 'theme_id' => 3, - 'imageset_id' => 3 ), array( 'style_id' => 2, @@ -53,7 +51,6 @@ class phpbb_dbal_order_lower_test extends phpbb_database_test_case 'style_active' => 0, 'template_id' => 2, 'theme_id' => 2, - 'imageset_id' => 2 ) ), $db->sql_fetchrowset($result) diff --git a/tests/dbal/schema_test.php b/tests/dbal/schema_test.php new file mode 100644 index 0000000000..2a332fddba --- /dev/null +++ b/tests/dbal/schema_test.php @@ -0,0 +1,38 @@ +<?php +/** +* +* @package testing +* @copyright (c) 2011 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; + +class phpbb_dbal_schema_test extends phpbb_database_test_case +{ + public function getDataSet() + { + return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/config.xml'); + } + + public function test_config_value_multibyte() + { + $db = $this->new_dbal(); + + $value = str_repeat("\xC3\x84", 255); + $sql = "INSERT INTO phpbb_config + (config_name, config_value) + VALUES ('name', '$value')"; + $result = $db->sql_query($sql); + + $sql = "SELECT config_value + FROM phpbb_config + WHERE config_name = 'name'"; + $result = $db->sql_query_limit($sql, 1); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + $this->assertEquals($value, $row['config_value']); + } +} |