diff options
| author | Nils Adermann <naderman@naderman.de> | 2011-11-18 19:14:06 +0100 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2011-11-18 19:14:06 +0100 |
| commit | addf81f62e69e23b4f31fc48997ac38683b88ebf (patch) | |
| tree | 4078d3786e8c84f253aa80a73214c2d5ad2de00a /tests/regex | |
| parent | 5068c0588733f80a8433aea1cd6f763819caa9f7 (diff) | |
| parent | 03918f7fd2fd790d5ebd4330f9f913bfcc206f91 (diff) | |
| download | forums-addf81f62e69e23b4f31fc48997ac38683b88ebf.tar forums-addf81f62e69e23b4f31fc48997ac38683b88ebf.tar.gz forums-addf81f62e69e23b4f31fc48997ac38683b88ebf.tar.bz2 forums-addf81f62e69e23b4f31fc48997ac38683b88ebf.tar.xz forums-addf81f62e69e23b4f31fc48997ac38683b88ebf.zip | |
Merge branch 'develop' into feature/extension-manager
* develop: (93 commits)
[ticket/10157] Add notification to update cpfs when installing a language.
[ticket/10185] Always set board startdate on conversion
[ticket/10419] Reword the language strings
[ticket/9361] View correct error messages when editing account information
[ticket/10457] Undefined variable $request, when print-viewing PMs
[ticket/10452] Fix xHTML errors when print-viewing PMs
[ticket/9066] Move regex into get_preg_expression function and add tests
[ticket/10254] Add "phpBB Group" to "Modified by" in prosilver stylesheet.css
[ticket/10254] Removing the subsilver2 NOTE, incompatible with phpBB.com.
[ticket/10254] Removing the NOTE as it is incompatible with phpBB.com.
[ticket/10254] Remove subsilver2 as default style on theme.
[ticket/10254] Remove style names from themes and fix some informations on it.
[ticket/7138] Allow simple header and footer for trigger_error() messages
[ticket/9066] Disallow some database prefix to prevent same errors and problems
[ticket/10365] Fix up S_POST_UNAPPROVED check, make it easier to read
[ticket/10437] Do not display announcements that are waiting for approval
[ticket/10087] Organize bans in acp_baninto optgroups
[ticket/8616] Include old U_INBOX var for BC
[ticket/10435] Remove global announcement from forums total topic count
[ticket/10435] Readd local announcements to total topic count in viewforum
...
Conflicts:
phpBB/install/database_update.php
Diffstat (limited to 'tests/regex')
| -rw-r--r-- | tests/regex/table_prefix_test.php | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/regex/table_prefix_test.php b/tests/regex/table_prefix_test.php new file mode 100644 index 0000000000..67a18b4fbc --- /dev/null +++ b/tests/regex/table_prefix_test.php @@ -0,0 +1,35 @@ +<?php +/** +* +* @package testing +* @copyright (c) 2011 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; + +class phpbb_regex_table_prefix_test extends phpbb_test_case +{ + public function table_prefix_test_data() + { + return array( + array('phpbb_', 1), + array('phpBB3', 1), + array('a', 1), + + array('', 0), + array('_', 0), + array('a-', 0), + array("'", 0), + ); + } + + /** + * @dataProvider table_prefix_test_data + */ + public function test_table_prefix($prefix, $expected) + { + $this->assertEquals($expected, preg_match(get_preg_expression('table_prefix'), $prefix)); + } +} |
