mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 15:05:43 +02:00
Merge remote-tracking branch 'upstream/develop' into feature/event-dispatcher
* upstream/develop: (30 commits) [task/travis] Refactor php version check for dbunit install [task/travis] Exclude functional and slow tests [ticket/10719] Revert "Skip functional tests on PHP 5.2" [task/travis-develop2] Update version from 5.3 to 5.3.2 [task/travis] Dropping support for 5.2 in develop branch [task/travis] Some more small travis fixes [task/travis] Rename travis phpunit config files [task/travis] Fixing some travis issues [ticket/10684] Adjust function and parameter name, minor changes. [task/travis] Add automated testing to readme [task/travis] Removing development information [task/travis] Adding Travis Continuous Intergration Support [ticket/10704] minor typo in a comment [ticket/10717] Fix profile field sample in prosilver´s memberlist_view.html [ticket/10691] Fixed the speed of creating search index [task/php54-ascraeus] Bring p_master#module_auth into PHP 5 era. [task/php54] Disable E_STRICT in Olympus when running on PHP 5.4. [task/php54] Refactor error_reporting call slightly. [ticket/10690] Fix undefined UNAPPROVED_POSTS_ZERO_TOTAL in queue [ticket/10689] Fix "First character"-option in "Find a member"-search ...
This commit is contained in:
commit
e35aecb9bd
25
.travis.yml
Normal file
25
.travis.yml
Normal file
@ -0,0 +1,25 @@
|
||||
language: php
|
||||
php:
|
||||
- 5.3.2
|
||||
- 5.4
|
||||
|
||||
env:
|
||||
- DB=mysql
|
||||
- DB=postgres
|
||||
|
||||
before_script:
|
||||
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS phpbb_tests;' -U postgres; fi"
|
||||
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database phpbb_tests;' -U postgres; fi"
|
||||
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database IF NOT EXISTS phpbb_tests;'; fi"
|
||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.2' ]; then pear install --force phpunit/DbUnit; else pyrus install --force phpunit/DbUnit; fi"
|
||||
- phpenv rehash
|
||||
|
||||
script:
|
||||
- phpunit --configuration travis/phpunit-$DB-travis.xml
|
||||
|
||||
notifications:
|
||||
email:
|
||||
recipients:
|
||||
- dev-team@phpbb.com
|
||||
on_success: change
|
||||
on_failure: change
|
@ -15,6 +15,12 @@ Find support and lots more on [phpBB.com](http://www.phpbb.com)! Discuss the dev
|
||||
3. [Read our Git Contribution Guidelines](http://wiki.phpbb.com/Git); if you're new to git, also read [the introduction guide](http://wiki.phpbb.com/display/DEV/Working+with+Git)
|
||||
4. Send us a pull request
|
||||
|
||||
## AUTOMATED TESTING
|
||||
|
||||
We have unit and functional tests in order to prevent regressions. You can view the bamboo continuous integration [here](http://bamboo.phpbb.com) or check our travis build below.
|
||||
develop - [](http://travis-ci.org/phpbb/phpbb3)
|
||||
develop-olympus - [](http://travis-ci.org/phpbb/phpbb3)
|
||||
|
||||
## LICENSE
|
||||
|
||||
[GNU General Public License v2](http://opensource.org/licenses/gpl-2.0.php)
|
||||
|
@ -35,7 +35,6 @@ $search_errors = array();
|
||||
$search = new $class_name($search_errors);
|
||||
|
||||
$batch_size = isset($argv[2]) ? $argv[2] : 2000;
|
||||
$time = time();
|
||||
|
||||
if (method_exists($search, 'create_index'))
|
||||
{
|
||||
@ -67,6 +66,7 @@ else
|
||||
while ($post_counter <= $max_post_id)
|
||||
{
|
||||
$row_count = 0;
|
||||
$time = time();
|
||||
|
||||
printf("Processing posts with %d <= post_id <= %d\n",
|
||||
$post_counter + 1,
|
||||
|
@ -128,7 +128,7 @@ class acp_users
|
||||
$dropdown_modes = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
if (!$this->p_master->module_auth($row['module_auth']))
|
||||
if (!$this->p_master->module_auth_self($row['module_auth']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ class p_master
|
||||
foreach ($this->module_cache['modules'] as $key => $row)
|
||||
{
|
||||
// Not allowed to view module?
|
||||
if (!$this->module_auth($row['module_auth']))
|
||||
if (!$this->module_auth_self($row['module_auth']))
|
||||
{
|
||||
unset($this->module_cache['modules'][$key]);
|
||||
continue;
|
||||
@ -315,9 +315,23 @@ class p_master
|
||||
}
|
||||
|
||||
/**
|
||||
* Check module authorisation
|
||||
* Check module authorisation.
|
||||
*
|
||||
* This is a non-static version that uses $this->acl_forum_id
|
||||
* for the forum id.
|
||||
*/
|
||||
function module_auth($module_auth, $forum_id = false)
|
||||
function module_auth_self($module_auth)
|
||||
{
|
||||
return self::module_auth($module_auth, $this->acl_forum_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check module authorisation.
|
||||
*
|
||||
* This is a static version, it must be given $forum_id.
|
||||
* See also module_auth_self.
|
||||
*/
|
||||
static function module_auth($module_auth, $forum_id)
|
||||
{
|
||||
global $auth, $config;
|
||||
global $request;
|
||||
@ -362,11 +376,9 @@ class p_master
|
||||
|
||||
$module_auth = implode(' ', $tokens);
|
||||
|
||||
// Make sure $id seperation is working fine
|
||||
// Make sure $id separation is working fine
|
||||
$module_auth = str_replace(' , ', ',', $module_auth);
|
||||
|
||||
$forum_id = ($forum_id === false) ? $this->acl_forum_id : $forum_id;
|
||||
|
||||
$is_auth = false;
|
||||
eval('$is_auth = (int) (' . preg_replace(array('#acl_([a-z0-9_]+)(,\$id)?#', '#\$id#', '#aclf_([a-z0-9_]+)#', '#cfg_([a-z0-9_]+)#', '#request_([a-zA-Z0-9_]+)#'), array('(int) $auth->acl_get(\'\\1\'\\2)', '(int) $forum_id', '(int) $auth->acl_getf_global(\'\\1\')', '(int) $config[\'\\1\']', '$request->variable(\'\\1\', false)'), $module_auth) . ');');
|
||||
|
||||
|
@ -1180,36 +1180,32 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id
|
||||
$topic_title = ($topic_notification) ? $topic_title : $subject;
|
||||
$topic_title = censor_text($topic_title);
|
||||
|
||||
// Get banned User ID's
|
||||
$sql = 'SELECT ban_userid
|
||||
FROM ' . BANLIST_TABLE . '
|
||||
WHERE ban_userid <> 0
|
||||
AND ban_exclude <> 1';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$sql_ignore_users = ANONYMOUS . ', ' . $user->data['user_id'];
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
// Exclude guests, current user and banned users from notifications
|
||||
if (!function_exists('phpbb_get_banned_user_ids'))
|
||||
{
|
||||
$sql_ignore_users .= ', ' . (int) $row['ban_userid'];
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
$sql_ignore_users = phpbb_get_banned_user_ids();
|
||||
$sql_ignore_users[ANONYMOUS] = ANONYMOUS;
|
||||
$sql_ignore_users[$user->data['user_id']] = $user->data['user_id'];
|
||||
|
||||
$notify_rows = array();
|
||||
|
||||
// -- get forum_userids || topic_userids
|
||||
$sql = 'SELECT u.user_id, u.username, u.user_email, u.user_lang, u.user_notify_type, u.user_jabber
|
||||
FROM ' . (($topic_notification) ? TOPICS_WATCH_TABLE : FORUMS_WATCH_TABLE) . ' w, ' . USERS_TABLE . ' u
|
||||
WHERE w.' . (($topic_notification) ? 'topic_id' : 'forum_id') . ' = ' . (($topic_notification) ? $topic_id : $forum_id) . "
|
||||
AND w.user_id NOT IN ($sql_ignore_users)
|
||||
AND w.notify_status = " . NOTIFY_YES . '
|
||||
WHERE w.' . (($topic_notification) ? 'topic_id' : 'forum_id') . ' = ' . (($topic_notification) ? $topic_id : $forum_id) . '
|
||||
AND ' . $db->sql_in_set('w.user_id', $sql_ignore_users, true) . '
|
||||
AND w.notify_status = ' . NOTIFY_YES . '
|
||||
AND u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')
|
||||
AND u.user_id = w.user_id';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$notify_rows[$row['user_id']] = array(
|
||||
'user_id' => $row['user_id'],
|
||||
$notify_user_id = (int) $row['user_id'];
|
||||
$notify_rows[$notify_user_id] = array(
|
||||
'user_id' => $notify_user_id,
|
||||
'username' => $row['username'],
|
||||
'user_email' => $row['user_email'],
|
||||
'user_jabber' => $row['user_jabber'],
|
||||
@ -1219,30 +1215,29 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id
|
||||
'method' => $row['user_notify_type'],
|
||||
'allowed' => false
|
||||
);
|
||||
|
||||
// Add users who have been already notified to ignore list
|
||||
$sql_ignore_users[$notify_user_id] = $notify_user_id;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// forum notification is sent to those not already receiving topic notifications
|
||||
if ($topic_notification)
|
||||
{
|
||||
if (sizeof($notify_rows))
|
||||
{
|
||||
$sql_ignore_users .= ', ' . implode(', ', array_keys($notify_rows));
|
||||
}
|
||||
|
||||
$sql = 'SELECT u.user_id, u.username, u.user_email, u.user_lang, u.user_notify_type, u.user_jabber
|
||||
FROM ' . FORUMS_WATCH_TABLE . ' fw, ' . USERS_TABLE . " u
|
||||
WHERE fw.forum_id = $forum_id
|
||||
AND fw.user_id NOT IN ($sql_ignore_users)
|
||||
AND fw.notify_status = " . NOTIFY_YES . '
|
||||
AND " . $db->sql_in_set('fw.user_id', $sql_ignore_users, true) . '
|
||||
AND fw.notify_status = ' . NOTIFY_YES . '
|
||||
AND u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')
|
||||
AND u.user_id = fw.user_id';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$notify_rows[$row['user_id']] = array(
|
||||
'user_id' => $row['user_id'],
|
||||
$notify_user_id = (int) $row['user_id'];
|
||||
$notify_rows[$notify_user_id] = array(
|
||||
'user_id' => $notify_user_id,
|
||||
'username' => $row['username'],
|
||||
'user_email' => $row['user_email'],
|
||||
'user_jabber' => $row['user_jabber'],
|
||||
@ -1273,7 +1268,6 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Now, we have to do a little step before really sending, we need to distinguish our users a little bit. ;)
|
||||
$msg_users = $delete_ids = $update_notification = array();
|
||||
foreach ($notify_rows as $user_id => $row)
|
||||
|
@ -1666,6 +1666,7 @@ function pm_notification($mode, $author, $recipients, $subject, $message, $msg_i
|
||||
|
||||
$subject = censor_text($subject);
|
||||
|
||||
// Exclude guests, current user and banned users from notifications
|
||||
unset($recipients[ANONYMOUS], $recipients[$user->data['user_id']]);
|
||||
|
||||
if (!sizeof($recipients))
|
||||
@ -1673,18 +1674,12 @@ function pm_notification($mode, $author, $recipients, $subject, $message, $msg_i
|
||||
return;
|
||||
}
|
||||
|
||||
// Get banned User ID's
|
||||
$sql = 'SELECT ban_userid
|
||||
FROM ' . BANLIST_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('ban_userid', array_map('intval', array_keys($recipients))) . '
|
||||
AND ban_exclude = 0';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
if (!function_exists('phpbb_get_banned_user_ids'))
|
||||
{
|
||||
unset($recipients[$row['ban_userid']]);
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
$banned_users = phpbb_get_banned_user_ids(array_keys($recipients));
|
||||
$recipients = array_diff(array_keys($recipients), $banned_users);
|
||||
|
||||
if (!sizeof($recipients))
|
||||
{
|
||||
@ -1693,7 +1688,7 @@ function pm_notification($mode, $author, $recipients, $subject, $message, $msg_i
|
||||
|
||||
$sql = 'SELECT user_id, username, user_email, user_lang, user_notify_pm, user_notify_type, user_jabber
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('user_id', array_map('intval', array_keys($recipients)));
|
||||
WHERE ' . $db->sql_in_set('user_id', $recipients);
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$msg_list_ary = array();
|
||||
|
@ -3691,3 +3691,36 @@ function remove_newly_registered($user_id, $user_data = false)
|
||||
|
||||
return $user_data['group_id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets user ids of currently banned registered users.
|
||||
*
|
||||
* @param array $user_ids Array of users' ids to check for banning,
|
||||
* leave empty to get complete list of banned ids
|
||||
* @return array Array of banned users' ids if any, empty array otherwise
|
||||
*/
|
||||
function phpbb_get_banned_user_ids($user_ids = array())
|
||||
{
|
||||
global $db;
|
||||
|
||||
$sql_user_ids = (!empty($user_ids)) ? $db->sql_in_set('ban_userid', $user_ids) : 'ban_userid <> 0';
|
||||
|
||||
// Get banned User ID's
|
||||
// Ignore stale bans which were not wiped yet
|
||||
$banned_ids_list = array();
|
||||
$sql = 'SELECT ban_userid
|
||||
FROM ' . BANLIST_TABLE . "
|
||||
WHERE $sql_user_ids
|
||||
AND ban_exclude <> 1
|
||||
AND (ban_end > " . time() . '
|
||||
OR ban_end = 0)';
|
||||
$result = $db->sql_query($sql);
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$user_id = (int) $row['ban_userid'];
|
||||
$banned_ids_list[$user_id] = $user_id;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
return $banned_ids_list;
|
||||
}
|
||||
|
@ -49,6 +49,16 @@ function mcp_topic_view($id, $mode, $action)
|
||||
$submitted_id_list = request_var('post_ids', array(0));
|
||||
$checked_ids = $post_id_list = request_var('post_id_list', array(0));
|
||||
|
||||
// Resync Topic?
|
||||
if ($action == 'resync')
|
||||
{
|
||||
if (!function_exists('mcp_resync_topics'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/mcp/mcp_forum.' . $phpEx);
|
||||
}
|
||||
mcp_resync_topics(array($topic_id));
|
||||
}
|
||||
|
||||
// Split Topic?
|
||||
if ($action == 'split_all' || $action == 'split_beyond')
|
||||
{
|
||||
@ -319,6 +329,7 @@ function mcp_topic_view($id, $mode, $action)
|
||||
'S_CAN_APPROVE' => ($has_unapproved_posts && $auth->acl_get('m_approve', $topic_info['forum_id'])) ? true : false,
|
||||
'S_CAN_LOCK' => ($auth->acl_get('m_lock', $topic_info['forum_id'])) ? true : false,
|
||||
'S_CAN_REPORT' => ($auth->acl_get('m_report', $topic_info['forum_id'])) ? true : false,
|
||||
'S_CAN_SYNC' => $auth->acl_get('m_', $topic_info['forum_id']),
|
||||
'S_REPORT_VIEW' => ($action == 'reports') ? true : false,
|
||||
'S_MERGE_VIEW' => ($action == 'merge') ? true : false,
|
||||
'S_SPLIT_VIEW' => ($action == 'split') ? true : false,
|
||||
|
@ -19,7 +19,8 @@ if (!defined('E_DEPRECATED'))
|
||||
{
|
||||
define('E_DEPRECATED', 8192);
|
||||
}
|
||||
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
|
||||
$level = E_ALL & ~E_NOTICE & ~E_DEPRECATED;
|
||||
error_reporting($level);
|
||||
|
||||
/*
|
||||
* Remove variables created by register_globals from the global scope
|
||||
|
@ -238,6 +238,7 @@ $lang = array_merge($lang, array(
|
||||
'NO_POST' => 'You have to select a post in order to warn the user for a post.',
|
||||
'NO_POST_REPORT' => 'This post was not reported.',
|
||||
'NO_POST_SELECTED' => 'You must select at least one post to perform this action.',
|
||||
'NO_POSTS_QUEUE' => 'There are no posts waiting for approval.',
|
||||
'NO_REASON_DISAPPROVAL' => 'Please give an appropriate reason for disapproval.',
|
||||
'NO_REPORT' => 'No report found',
|
||||
'NO_REPORTS' => 'No reports found',
|
||||
|
@ -1347,6 +1347,7 @@ switch ($mode)
|
||||
if ($mode)
|
||||
{
|
||||
$params[] = "mode=$mode";
|
||||
$u_first_char_params[] = "mode=$mode";
|
||||
}
|
||||
$sort_params[] = "mode=$mode";
|
||||
|
||||
|
@ -78,7 +78,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ELSE -->
|
||||
<p class="notopics"><strong><!-- IF S_TOPICS -->{L_NO_TOPICS_QUEUE}<!-- ELSE -->{L_UNAPPROVED_POSTS_ZERO_TOTAL}<!-- ENDIF --></strong></p>
|
||||
<p class="notopics"><strong><!-- IF S_TOPICS -->{L_NO_TOPICS_QUEUE}<!-- ELSE -->{L_NO_POSTS_QUEUE}<!-- ENDIF --></strong></p>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
|
@ -158,6 +158,7 @@ onload_functions.push('subPanels()');
|
||||
<!-- IF S_CAN_DELETE --><option value="delete_post">{L_DELETE_POSTS}</option><!-- ENDIF -->
|
||||
<!-- IF S_CAN_MERGE --><option value="merge_posts"<!-- IF S_MERGE_VIEW --> selected="selected"<!-- ENDIF -->>{L_MERGE_POSTS}</option><!-- ENDIF -->
|
||||
<!-- IF S_CAN_SPLIT --><option value="split_all"<!-- IF S_SPLIT_VIEW --> selected="selected"<!-- ENDIF -->>{L_SPLIT_POSTS}</option><option value="split_beyond">{L_SPLIT_AFTER}</option><!-- ENDIF -->
|
||||
<!-- IF S_CAN_SYNC --><option value="resync">{L_RESYNC}</option><!-- ENDIF -->
|
||||
</select>
|
||||
<input class="button1" type="submit" name="mcp_topic_submit" value="{L_SUBMIT}" />
|
||||
<div><a href="#" onclick="marklist('mcp', 'post', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('mcp', 'post', false); return false;">{L_UNMARK_ALL}</a></div>
|
||||
|
@ -69,7 +69,7 @@
|
||||
<!-- IF U_JABBER and S_JABBER_ENABLED --><dt>{L_JABBER}:</dt> <dd><a href="{U_JABBER}" onclick="popup(this.href, 550, 320); return false;">{L_SEND_JABBER_MESSAGE}</a></dd><!-- ELSEIF USER_JABBER --><dt>{L_JABBER}:</dt> <dd>{USER_JABBER}</dd><!-- ENDIF -->
|
||||
<!-- IF S_PROFILE_FIELD1 -->
|
||||
<!-- NOTE: Use a construct like this to include admin defined profile fields. Replace FIELD1 with the name of your field. -->
|
||||
<dt>{postrow.PROFILE_FIELD1_NAME}:</dt> <dd>{postrow.PROFILE_FIELD1_VALUE}</dd>
|
||||
<dt>{PROFILE_FIELD1_NAME}:</dt> <dd>{PROFILE_FIELD1_VALUE}</dd>
|
||||
<!-- ENDIF -->
|
||||
</dl>
|
||||
</div>
|
||||
|
@ -27,7 +27,7 @@
|
||||
</tr>
|
||||
<!-- BEGINELSE -->
|
||||
<tr>
|
||||
<td class="row1" colspan="4" height="30" align="center" valign="middle"><span class="gen"><!-- IF S_TOPICS -->{L_NO_TOPICS_QUEUE}<!-- ELSE -->{L_UNAPPROVED_POSTS_ZERO_TOTAL}<!-- ENDIF --></span></td>
|
||||
<td class="row1" colspan="4" height="30" align="center" valign="middle"><span class="gen"><!-- IF S_TOPICS -->{L_NO_TOPICS_QUEUE}<!-- ELSE -->{L_NO_POSTS_QUEUE}<!-- ENDIF --></span></td>
|
||||
</tr>
|
||||
<!-- END postrow -->
|
||||
<tr>
|
||||
|
@ -135,6 +135,7 @@
|
||||
<!-- IF S_CAN_DELETE --><option value="delete_post">{L_DELETE_POSTS}</option><!-- ENDIF -->
|
||||
<!-- IF S_CAN_MERGE --><option value="merge_posts"<!-- IF ACTION eq 'merge' --> selected="selected"<!-- ENDIF -->>{L_MERGE_POSTS}</option><!-- ENDIF -->
|
||||
<!-- IF S_CAN_SPLIT --><option value="split_all"<!-- IF ACTION eq 'split' --> selected="selected"<!-- ENDIF -->>{L_SPLIT_POSTS}</option><option value="split_beyond">{L_SPLIT_AFTER}</option><!-- ENDIF -->
|
||||
<!-- IF S_CAN_SYNC --><option value="resync">{L_RESYNC}</option><!-- ENDIF -->
|
||||
</select> <input class="btnmain" type="submit" name="mcp_topic_submit" value="{L_SUBMIT}" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -14,10 +14,6 @@
|
||||
<testsuites>
|
||||
<testsuite name="phpBB Test Suite">
|
||||
<directory suffix="_test.php">./tests/</directory>
|
||||
<exclude>./tests/functional</exclude>
|
||||
</testsuite>
|
||||
<testsuite name="phpBB Functional Tests">
|
||||
<directory suffix="_test.php" phpVersion="5.3.0" phpVersionOperator=">=">./tests/functional</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
|
@ -14,10 +14,6 @@
|
||||
<testsuites>
|
||||
<testsuite name="phpBB Test Suite">
|
||||
<directory suffix="_test.php">./tests/</directory>
|
||||
<exclude>./tests/functional</exclude>
|
||||
</testsuite>
|
||||
<testsuite name="phpBB Functional Tests">
|
||||
<directory suffix="_test.php" phpVersion="5.3.0" phpVersionOperator=">=">./tests/functional</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
|
@ -14,10 +14,6 @@
|
||||
<testsuites>
|
||||
<testsuite name="phpBB Test Suite">
|
||||
<directory suffix="_test.php">./tests/</directory>
|
||||
<exclude>./tests/functional</exclude>
|
||||
</testsuite>
|
||||
<testsuite name="phpBB Functional Tests">
|
||||
<directory suffix="_test.php" phpVersion="5.3.0" phpVersionOperator=">=">./tests/functional</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
|
@ -25,8 +25,4 @@ require_once 'test_framework/phpbb_test_case_helpers.php';
|
||||
require_once 'test_framework/phpbb_test_case.php';
|
||||
require_once 'test_framework/phpbb_database_test_case.php';
|
||||
require_once 'test_framework/phpbb_database_test_connection_manager.php';
|
||||
|
||||
if (version_compare(PHP_VERSION, '5.3.0-dev', '>='))
|
||||
{
|
||||
require_once 'test_framework/phpbb_functional_test_case.php';
|
||||
}
|
||||
require_once 'test_framework/phpbb_functional_test_case.php';
|
||||
|
34
travis/phpunit-mysql-travis.xml
Normal file
34
travis/phpunit-mysql-travis.xml
Normal file
@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit backupGlobals="true"
|
||||
backupStaticAttributes="true"
|
||||
colors="true"
|
||||
convertErrorsToExceptions="true"
|
||||
convertNoticesToExceptions="true"
|
||||
convertWarningsToExceptions="true"
|
||||
processIsolation="false"
|
||||
stopOnFailure="false"
|
||||
syntaxCheck="true"
|
||||
strict="true"
|
||||
bootstrap="../tests/bootstrap.php">
|
||||
<testsuites>
|
||||
<testsuite name="phpBB Test Suite">
|
||||
<directory suffix="_test.php">../tests/</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
<groups>
|
||||
<exclude>
|
||||
<group>slow</group>
|
||||
</exclude>
|
||||
</groups>
|
||||
|
||||
<php>
|
||||
<const name="dbms" value="mysqli"/>
|
||||
<const name="dbhost" value="0.0.0.0" />
|
||||
<const name="dbport" value="3306" />
|
||||
<const name="dbname" value="phpbb_tests" />
|
||||
<const name="dbuser" value="root" />
|
||||
<const name="dbpasswd" value="" />
|
||||
<const name="table_prefix" value="phpbb_"/>
|
||||
</php>
|
||||
</phpunit>
|
36
travis/phpunit-postgres-travis.xml
Normal file
36
travis/phpunit-postgres-travis.xml
Normal file
@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit backupGlobals="true"
|
||||
backupStaticAttributes="true"
|
||||
colors="true"
|
||||
convertErrorsToExceptions="true"
|
||||
convertNoticesToExceptions="true"
|
||||
convertWarningsToExceptions="true"
|
||||
processIsolation="false"
|
||||
stopOnFailure="false"
|
||||
syntaxCheck="true"
|
||||
strict="true"
|
||||
bootstrap="../tests/bootstrap.php">
|
||||
<testsuites>
|
||||
<testsuite name="phpBB Test Suite">
|
||||
<directory suffix="_test.php">../tests/</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
<groups>
|
||||
<exclude>
|
||||
<group>slow</group>
|
||||
</exclude>
|
||||
</groups>
|
||||
|
||||
<php>
|
||||
<!-- "Real" test database -->
|
||||
<!-- uncomment, otherwise sqlite memory runs -->
|
||||
<const name="dbms" value="postgres"/>
|
||||
<const name="dbhost" value="localhost" />
|
||||
<const name="dbport" value="5432" />
|
||||
<const name="dbname" value="phpbb_tests" />
|
||||
<const name="dbuser" value="postgres" />
|
||||
<const name="dbpasswd" value="" />
|
||||
<const name="table_prefix" value="phpbb_"/>
|
||||
</php>
|
||||
</phpunit>
|
Loading…
x
Reference in New Issue
Block a user