Merge pull request #260 from board3/ticket/12483
Use new testing framework, weeeeh
This commit is contained in:
81
.travis.yml
81
.travis.yml
@@ -1,54 +1,57 @@
|
|||||||
language: php
|
language: php
|
||||||
php:
|
|
||||||
- 5.3.3
|
matrix:
|
||||||
- 5.3
|
include:
|
||||||
- 5.4
|
- php: 5.3.3
|
||||||
- 5.5
|
env: DB=mysqli
|
||||||
- 5.6
|
- php: 5.3
|
||||||
|
env: DB=mysqli # MyISAM
|
||||||
|
- php: 5.4
|
||||||
|
env: DB=mysqli
|
||||||
|
- php: 5.4
|
||||||
|
env: DB=mysql
|
||||||
|
- php: 5.4
|
||||||
|
env: DB=mariadb
|
||||||
|
- php: 5.4
|
||||||
|
env: DB=postgres
|
||||||
|
- php: 5.4
|
||||||
|
env: DB=sqlite3
|
||||||
|
- php: 5.5
|
||||||
|
env: DB=mysqli
|
||||||
|
- php: 5.6
|
||||||
|
env: DB=mysqli
|
||||||
|
- php: hhvm
|
||||||
|
env: DB=mysqli
|
||||||
|
allow_failures:
|
||||||
|
- php: hhvm
|
||||||
|
- env: DB=sqlite3
|
||||||
|
fast_finish: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
- DB=mysql
|
global:
|
||||||
|
- EXTNAME="board3/portal"
|
||||||
|
- SNIFF="0" # Should we run code sniffer on your code?
|
||||||
|
- IMAGE_ICC="0" # Should we run icc profile sniffer on your images?
|
||||||
|
- PHPBB_BRANCH="ticket/12483" # - PHPBB_BRANCH="develop-ascraeus"
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
except:
|
except:
|
||||||
- master
|
- master
|
||||||
- develop-1_0_X
|
- develop-1_0_X
|
||||||
|
|
||||||
|
install:
|
||||||
|
- travis/prepare-phpbb.sh $EXTNAME $PHPBB_BRANCH
|
||||||
|
- cd ../../phpBB3
|
||||||
|
- travis/prepare-extension.sh $EXTNAME $PHPBB_BRANCH
|
||||||
|
- travis/setup-phpbb.sh $DB $TRAVIS_PHP_VERSION
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
# checkout phpBB and move your extension in place
|
- travis/setup-database.sh $DB $TRAVIS_PHP_VERSION
|
||||||
- cd ../../
|
|
||||||
- git clone "git://github.com/phpbb/phpbb3.git" "phpBB3"
|
|
||||||
- mkdir phpBB3/phpBB/ext/board3
|
|
||||||
- find -type d -name "Board3-Portal" -print | xargs -i mv {} phpBB3/phpBB/ext/board3/portal
|
|
||||||
|
|
||||||
# Setup the dependencies
|
|
||||||
- cd phpBB3/phpBB
|
|
||||||
- php ../composer.phar install --dev --no-interaction --prefer-source
|
|
||||||
|
|
||||||
# Setup the tests/travis
|
|
||||||
- cd ext/board3/portal
|
|
||||||
- sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'DROP DATABASE IF EXISTS phpbb_tests;' -U postgres; fi"
|
|
||||||
- sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'create database phpbb_tests;' -U postgres; fi"
|
|
||||||
- sh -c "if [ '$DB' = 'mariadb' ]; then travis/setup-mariadb.sh; fi"
|
|
||||||
- sh -c "if [ '$DB' = 'mysql' -o '$DB' = 'mariadb' ]; then mysql -e 'create database IF NOT EXISTS phpbb_tests;'; fi"
|
|
||||||
- travis/install-php-extensions.sh
|
|
||||||
- phpenv rehash
|
|
||||||
- sh -c "if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.3.19', '>=');"` = "1" ]; then travis/setup-webserver.sh; fi"
|
|
||||||
- rm -R -f phpredis
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- cd ../../../../build
|
- sh -c "if [ '$SNIFF' != '0' ]; then travis/phing-sniff.sh $DB $TRAVIS_PHP_VERSION; fi"
|
||||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.5' -a '$DB' = 'mysql' ]; then ../phpBB/vendor/bin/phing sniff; fi"
|
- sh -c "if [ '$IMAGE_ICC' != '0' ]; then travis/check-image-icc-profiles.sh $DB $TRAVIS_PHP_VERSION; fi"
|
||||||
- cd ../phpBB/ext/board3/portal
|
- phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/travis/phpunit-$DB-travis.xml --bootstrap ./tests/bootstrap.php
|
||||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.5' -a '$DB' = 'mysql' ]; then php develop/spellchecker.php; fi"
|
|
||||||
- ../../../vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- php: 5.4
|
|
||||||
env: DB=mariadb
|
|
||||||
- php: 5.4
|
|
||||||
env: DB=postgres
|
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email:
|
email:
|
||||||
|
|||||||
@@ -10,22 +10,20 @@
|
|||||||
stopOnFailure="false"
|
stopOnFailure="false"
|
||||||
syntaxCheck="false"
|
syntaxCheck="false"
|
||||||
verbose="true"
|
verbose="true"
|
||||||
bootstrap="tests/bootstrap.php">
|
bootstrap="../../../../tests/bootstrap.php">
|
||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="Board3 Portal Test Suite">
|
<testsuite name="Extension Test Suite">
|
||||||
<directory suffix="_test.php">./tests</directory>
|
<directory suffix="_test.php">./tests</directory>
|
||||||
</testsuite>
|
<exclude>./tests/functional</exclude>
|
||||||
</testsuites>
|
</testsuite>
|
||||||
|
<testsuite name="Extension Functional Tests">
|
||||||
|
<directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">./tests/functional/</directory>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
|
||||||
<groups>
|
<filter>
|
||||||
<exclude>
|
<blacklist>
|
||||||
<group>slow</group>
|
<directory>./tests/</directory>
|
||||||
</exclude>
|
</blacklist>
|
||||||
</groups>
|
</filter>
|
||||||
|
|
||||||
<filter>
|
|
||||||
<blacklist>
|
|
||||||
<directory>./tests/</directory>
|
|
||||||
</blacklist>
|
|
||||||
</filter>
|
|
||||||
</phpunit>
|
</phpunit>
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @package phpBB Gallery Testing
|
|
||||||
* @copyright (c) 2013 nickvergessen
|
|
||||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
define('IN_PHPBB', true);
|
|
||||||
$phpbb_root_path = './../../../';
|
|
||||||
$phpEx = 'php';
|
|
||||||
require_once $phpbb_root_path . 'includes/startup.' . $phpEx;
|
|
||||||
|
|
||||||
$table_prefix = 'phpbb_';
|
|
||||||
require_once $phpbb_root_path . 'includes/constants.' . $phpEx;
|
|
||||||
require_once $phpbb_root_path . 'phpbb/class_loader.' . $phpEx;
|
|
||||||
|
|
||||||
$phpbb_class_loader_mock = new \phpbb\class_loader('phpbb_mock_', $phpbb_root_path . '../tests/mock/', "php");
|
|
||||||
$phpbb_class_loader_mock->register();
|
|
||||||
$phpbb_class_loader_ext = new \phpbb\class_loader('\\', $phpbb_root_path . 'ext/', "php");
|
|
||||||
$phpbb_class_loader_ext->register();
|
|
||||||
$phpbb_class_loader = new \phpbb\class_loader('phpbb\\', $phpbb_root_path . 'phpbb/', "php");
|
|
||||||
$phpbb_class_loader->register();
|
|
||||||
|
|
||||||
require_once $phpbb_root_path . '../tests/test_framework/phpbb_test_case_helpers.' . $phpEx;
|
|
||||||
require_once $phpbb_root_path . '../tests/test_framework/phpbb_test_case.' . $phpEx;
|
|
||||||
require_once $phpbb_root_path . '../tests/test_framework/phpbb_database_test_case.' . $phpEx;
|
|
||||||
require_once $phpbb_root_path . '../tests/test_framework/phpbb_database_test_connection_manager.' . $phpEx;
|
|
||||||
require_once $phpbb_root_path . '../tests/test_framework/phpbb_functional_test_case.' . $phpEx;
|
|
||||||
@@ -15,9 +15,9 @@ class phpbb_functional_portal_acp_test extends \board3\portal\tests\testframewor
|
|||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
$this->login();
|
$this->login();
|
||||||
$this->admin_login();
|
$this->admin_login();
|
||||||
$this->enable_board3_portal_ext();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function acp_pages_data()
|
public function acp_pages_data()
|
||||||
@@ -34,7 +34,7 @@ class phpbb_functional_portal_acp_test extends \board3\portal\tests\testframewor
|
|||||||
*/
|
*/
|
||||||
public function test_acp_pages($mode)
|
public function test_acp_pages($mode)
|
||||||
{
|
{
|
||||||
$crawler = self::request('GET', 'adm/index.php?i=\board3\portal\acp\portal_module&mode=' . $mode . '&sid=' . $this->sid);
|
self::request('GET', 'adm/index.php?i=\board3\portal\acp\portal_module&mode=' . $mode . '&sid=' . $this->sid);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_move_first_module_up()
|
public function test_move_first_module_up()
|
||||||
@@ -44,7 +44,7 @@ class phpbb_functional_portal_acp_test extends \board3\portal\tests\testframewor
|
|||||||
preg_match('/module_id=(?:([0-9]{1,3}))/', $module_link, $output);
|
preg_match('/module_id=(?:([0-9]{1,3}))/', $module_link, $output);
|
||||||
$this->assertNotEmpty($output[1]);
|
$this->assertNotEmpty($output[1]);
|
||||||
$module_id = $output[1];
|
$module_id = $output[1];
|
||||||
$crawler = self::request('GET', 'adm/index.php?i=\board3\portal\acp\portal_module&mode=modules&module_id=' . $module_id . '&action=move_up&sid=' . $this->sid);
|
self::request('GET', 'adm/index.php?i=\board3\portal\acp\portal_module&mode=modules&module_id=' . $module_id . '&action=move_up&sid=' . $this->sid);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_move_last_module_down()
|
public function test_move_last_module_down()
|
||||||
@@ -54,7 +54,7 @@ class phpbb_functional_portal_acp_test extends \board3\portal\tests\testframewor
|
|||||||
preg_match('/module_id=(?:([0-9]{1,3}))/', $module_link, $output);
|
preg_match('/module_id=(?:([0-9]{1,3}))/', $module_link, $output);
|
||||||
$this->assertNotEmpty($output[1]);
|
$this->assertNotEmpty($output[1]);
|
||||||
$module_id = $output[1];
|
$module_id = $output[1];
|
||||||
$crawler = self::request('GET', 'adm/index.php?i=\board3\portal\acp\portal_module&mode=modules&module_id=' . $module_id . '&action=move_down&sid=' . $this->sid);
|
self::request('GET', 'adm/index.php?i=\board3\portal\acp\portal_module&mode=modules&module_id=' . $module_id . '&action=move_down&sid=' . $this->sid);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_delete_module()
|
public function test_delete_module()
|
||||||
@@ -73,6 +73,6 @@ class phpbb_functional_portal_acp_test extends \board3\portal\tests\testframewor
|
|||||||
$crawler = self::request('GET', 'adm/index.php?i=\board3\portal\acp\portal_module&mode=modules&add[center]=true&sid=' . $this->sid);
|
$crawler = self::request('GET', 'adm/index.php?i=\board3\portal\acp\portal_module&mode=modules&add[center]=true&sid=' . $this->sid);
|
||||||
$form = $crawler->selectButton('submit')->form();
|
$form = $crawler->selectButton('submit')->form();
|
||||||
$form->setValues(array('module_classname' => $module_name));
|
$form->setValues(array('module_classname' => $module_name));
|
||||||
$crawler = self::submit($form);
|
self::submit($form);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ class phpbb_functional_portal_announcement_test extends \board3\portal\tests\tes
|
|||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
$this->login();
|
$this->login();
|
||||||
$this->admin_login();
|
$this->admin_login();
|
||||||
$this->enable_board3_portal_ext();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_with_announce()
|
public function test_with_announce()
|
||||||
@@ -30,7 +30,7 @@ class phpbb_functional_portal_announcement_test extends \board3\portal\tests\tes
|
|||||||
if (isset($data))
|
if (isset($data))
|
||||||
{
|
{
|
||||||
// no errors should appear on portal
|
// no errors should appear on portal
|
||||||
$crawler = self::request('GET', 'app.php/portal');
|
self::request('GET', 'app.php/portal');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ class phpbb_functional_portal_announcement_test extends \board3\portal\tests\tes
|
|||||||
if (isset($data))
|
if (isset($data))
|
||||||
{
|
{
|
||||||
// no errors should appear on portal
|
// no errors should appear on portal
|
||||||
$crawler = self::request('GET', 'app.php/portal');
|
self::request('GET', 'app.php/portal');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,6 +54,6 @@ class phpbb_functional_portal_announcement_test extends \board3\portal\tests\tes
|
|||||||
public function test_after_announce()
|
public function test_after_announce()
|
||||||
{
|
{
|
||||||
$this->logout();
|
$this->logout();
|
||||||
$crawler = self::request('GET', 'app.php/portal');
|
self::request('GET', 'app.php/portal');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ class phpbb_functional_portal_birthday_list_test extends \board3\portal\tests\te
|
|||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
$this->login();
|
$this->login();
|
||||||
$this->admin_login();
|
$this->admin_login();
|
||||||
$this->enable_board3_portal_ext();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_setup_birthday()
|
public function test_setup_birthday()
|
||||||
@@ -26,7 +26,7 @@ class phpbb_functional_portal_birthday_list_test extends \board3\portal\tests\te
|
|||||||
$uid = $this->create_user('portal_birthday_user');
|
$uid = $this->create_user('portal_birthday_user');
|
||||||
if (!$uid)
|
if (!$uid)
|
||||||
{
|
{
|
||||||
$this->markIncomplete('Unable to create portal_user');
|
$this->markTestIncomplete('Unable to create portal_user');
|
||||||
}
|
}
|
||||||
$this->login('portal_birthday_user');
|
$this->login('portal_birthday_user');
|
||||||
$crawler = self::request('GET', 'ucp.php?i=ucp_profile&mode=profile_info&sid=' . $this->sid);
|
$crawler = self::request('GET', 'ucp.php?i=ucp_profile&mode=profile_info&sid=' . $this->sid);
|
||||||
@@ -36,7 +36,7 @@ class phpbb_functional_portal_birthday_list_test extends \board3\portal\tests\te
|
|||||||
'bday_month' => date('m', time() + 86400*2),
|
'bday_month' => date('m', time() + 86400*2),
|
||||||
'bday_year' => date('Y', time() + 86400*2),
|
'bday_year' => date('Y', time() + 86400*2),
|
||||||
));
|
));
|
||||||
$crawler = self::submit($form);
|
self::submit($form);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -15,13 +15,13 @@ class phpbb_functional_portal_no_error_test extends \board3\portal\tests\testfra
|
|||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
$this->login();
|
$this->login();
|
||||||
$this->admin_login();
|
$this->admin_login();
|
||||||
$this->enable_board3_portal_ext();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_vanilla_board()
|
public function test_vanilla_board()
|
||||||
{
|
{
|
||||||
$crawler = self::request('GET', 'app.php/portal');
|
self::request('GET', 'app.php/portal');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ class phpbb_functional_portal_redirect_test extends \board3\portal\tests\testfra
|
|||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
$this->login();
|
$this->login();
|
||||||
$this->admin_login();
|
$this->admin_login();
|
||||||
$this->enable_board3_portal_ext();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_redirect()
|
public function test_redirect()
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ class phpbb_functional_portal_visit_registered_test extends \board3\portal\tests
|
|||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
$this->login();
|
$this->login();
|
||||||
$this->admin_login();
|
$this->admin_login();
|
||||||
$this->enable_board3_portal_ext();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_vanilla_board()
|
public function test_vanilla_board()
|
||||||
@@ -26,10 +26,10 @@ class phpbb_functional_portal_visit_registered_test extends \board3\portal\tests
|
|||||||
$uid = $this->create_user('portal_user');
|
$uid = $this->create_user('portal_user');
|
||||||
if (!$uid)
|
if (!$uid)
|
||||||
{
|
{
|
||||||
$this->markIncomplete('Unable to create portal_user');
|
$this->markTestIncomplete('Unable to create portal_user');
|
||||||
}
|
}
|
||||||
$this->login('portal_user');
|
$this->login('portal_user');
|
||||||
$crawler = self::request('GET', 'app.php/portal');
|
self::request('GET', 'app.php/portal');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_with_announce()
|
public function test_with_announce()
|
||||||
@@ -42,7 +42,7 @@ class phpbb_functional_portal_visit_registered_test extends \board3\portal\tests
|
|||||||
if (isset($data))
|
if (isset($data))
|
||||||
{
|
{
|
||||||
// no errors should appear on portal
|
// no errors should appear on portal
|
||||||
$crawler = self::request('GET', 'app.php/portal');
|
self::request('GET', 'app.php/portal');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ class phpbb_functional_portal_visit_registered_test extends \board3\portal\tests
|
|||||||
if (isset($data))
|
if (isset($data))
|
||||||
{
|
{
|
||||||
// no errors should appear on portal
|
// no errors should appear on portal
|
||||||
$crawler = self::request('GET', 'app.php/portal');
|
self::request('GET', 'app.php/portal');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ class phpbb_functional_portal_visit_registered_test extends \board3\portal\tests
|
|||||||
public function test_after_announce()
|
public function test_after_announce()
|
||||||
{
|
{
|
||||||
$this->logout();
|
$this->logout();
|
||||||
$crawler = self::request('GET', 'app.php/portal');
|
self::request('GET', 'app.php/portal');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_with_poll()
|
public function test_with_poll()
|
||||||
@@ -82,10 +82,10 @@ class phpbb_functional_portal_visit_registered_test extends \board3\portal\tests
|
|||||||
$crawler = self::request('GET', 'app.php/portal');
|
$crawler = self::request('GET', 'app.php/portal');
|
||||||
$form = $crawler->selectButton('Submit vote')->form();
|
$form = $crawler->selectButton('Submit vote')->form();
|
||||||
$form->setValues(array('vote_id' => array(1)));
|
$form->setValues(array('vote_id' => array(1)));
|
||||||
$crawler = self::submit($form);
|
self::submit($form);
|
||||||
|
|
||||||
// no errors should appear on portal
|
// no errors should appear on portal
|
||||||
$crawler = self::request('GET', 'app.php/portal');
|
self::request('GET', 'app.php/portal');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ class phpbb_functional_portal_visit_registered_test extends \board3\portal\tests
|
|||||||
public function test_after_poll()
|
public function test_after_poll()
|
||||||
{
|
{
|
||||||
$this->logout();
|
$this->logout();
|
||||||
$crawler = self::request('GET', 'app.php/portal');
|
self::request('GET', 'app.php/portal');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_whois_online_legend()
|
public function test_whois_online_legend()
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ class phpbb_functional_portal_vote_poll_test extends \board3\portal\tests\testfr
|
|||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
$this->login();
|
$this->login();
|
||||||
$this->admin_login();
|
$this->admin_login();
|
||||||
$this->enable_board3_portal_ext();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_with_poll()
|
public function test_with_poll()
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
# DO NOT EDIT THIS FILE, IT IS GENERATED
|
|
||||||
#
|
|
||||||
# To change the contents of this file, edit
|
|
||||||
# phpBB/develop/create_schema_files.php and
|
|
||||||
# run it.
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
/*
|
|
||||||
* DO NOT EDIT THIS FILE, IT IS GENERATED
|
|
||||||
*
|
|
||||||
* To change the contents of this file, edit
|
|
||||||
* phpBB/develop/create_schema_files.php and
|
|
||||||
* run it.
|
|
||||||
*/
|
|
||||||
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
# DO NOT EDIT THIS FILE, IT IS GENERATED
|
|
||||||
#
|
|
||||||
# To change the contents of this file, edit
|
|
||||||
# phpBB/develop/create_schema_files.php and
|
|
||||||
# run it.
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
# DO NOT EDIT THIS FILE, IT IS GENERATED
|
|
||||||
#
|
|
||||||
# To change the contents of this file, edit
|
|
||||||
# phpBB/develop/create_schema_files.php and
|
|
||||||
# run it.
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
/*
|
|
||||||
* DO NOT EDIT THIS FILE, IT IS GENERATED
|
|
||||||
*
|
|
||||||
* To change the contents of this file, edit
|
|
||||||
* phpBB/develop/create_schema_files.php and
|
|
||||||
* run it.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
This first section is optional, however its probably the best method
|
|
||||||
of running phpBB on Oracle. If you already have a tablespace and user created
|
|
||||||
for phpBB you can leave this section commented out!
|
|
||||||
|
|
||||||
The first set of statements create a phpBB tablespace and a phpBB user,
|
|
||||||
make sure you change the password of the phpBB user before you run this script!!
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
CREATE TABLESPACE "PHPBB"
|
|
||||||
LOGGING
|
|
||||||
DATAFILE 'E:\ORACLE\ORADATA\LOCAL\PHPBB.ora'
|
|
||||||
SIZE 10M
|
|
||||||
AUTOEXTEND ON NEXT 10M
|
|
||||||
MAXSIZE 100M;
|
|
||||||
|
|
||||||
CREATE USER "PHPBB"
|
|
||||||
PROFILE "DEFAULT"
|
|
||||||
IDENTIFIED BY "phpbb_password"
|
|
||||||
DEFAULT TABLESPACE "PHPBB"
|
|
||||||
QUOTA UNLIMITED ON "PHPBB"
|
|
||||||
ACCOUNT UNLOCK;
|
|
||||||
|
|
||||||
GRANT ANALYZE ANY TO "PHPBB";
|
|
||||||
GRANT CREATE SEQUENCE TO "PHPBB";
|
|
||||||
GRANT CREATE SESSION TO "PHPBB";
|
|
||||||
GRANT CREATE TABLE TO "PHPBB";
|
|
||||||
GRANT CREATE TRIGGER TO "PHPBB";
|
|
||||||
GRANT CREATE VIEW TO "PHPBB";
|
|
||||||
GRANT "CONNECT" TO "PHPBB";
|
|
||||||
|
|
||||||
COMMIT;
|
|
||||||
DISCONNECT;
|
|
||||||
|
|
||||||
CONNECT phpbb/phpbb_password;
|
|
||||||
*/
|
|
||||||
@@ -1,87 +0,0 @@
|
|||||||
/*
|
|
||||||
* DO NOT EDIT THIS FILE, IT IS GENERATED
|
|
||||||
*
|
|
||||||
* To change the contents of this file, edit
|
|
||||||
* phpBB/develop/create_schema_files.php and
|
|
||||||
* run it.
|
|
||||||
*/
|
|
||||||
|
|
||||||
BEGIN;
|
|
||||||
|
|
||||||
/*
|
|
||||||
Domain definition
|
|
||||||
*/
|
|
||||||
CREATE DOMAIN varchar_ci AS varchar(255) NOT NULL DEFAULT ''::character varying;
|
|
||||||
|
|
||||||
/*
|
|
||||||
Operation Functions
|
|
||||||
*/
|
|
||||||
CREATE FUNCTION _varchar_ci_equal(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) = LOWER($2)' LANGUAGE SQL STRICT;
|
|
||||||
CREATE FUNCTION _varchar_ci_not_equal(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) != LOWER($2)' LANGUAGE SQL STRICT;
|
|
||||||
CREATE FUNCTION _varchar_ci_less_than(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) < LOWER($2)' LANGUAGE SQL STRICT;
|
|
||||||
CREATE FUNCTION _varchar_ci_less_equal(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) <= LOWER($2)' LANGUAGE SQL STRICT;
|
|
||||||
CREATE FUNCTION _varchar_ci_greater_than(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) > LOWER($2)' LANGUAGE SQL STRICT;
|
|
||||||
CREATE FUNCTION _varchar_ci_greater_equals(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) >= LOWER($2)' LANGUAGE SQL STRICT;
|
|
||||||
|
|
||||||
/*
|
|
||||||
Operators
|
|
||||||
*/
|
|
||||||
CREATE OPERATOR <(
|
|
||||||
PROCEDURE = _varchar_ci_less_than,
|
|
||||||
LEFTARG = varchar_ci,
|
|
||||||
RIGHTARG = varchar_ci,
|
|
||||||
COMMUTATOR = >,
|
|
||||||
NEGATOR = >=,
|
|
||||||
RESTRICT = scalarltsel,
|
|
||||||
JOIN = scalarltjoinsel);
|
|
||||||
|
|
||||||
CREATE OPERATOR <=(
|
|
||||||
PROCEDURE = _varchar_ci_less_equal,
|
|
||||||
LEFTARG = varchar_ci,
|
|
||||||
RIGHTARG = varchar_ci,
|
|
||||||
COMMUTATOR = >=,
|
|
||||||
NEGATOR = >,
|
|
||||||
RESTRICT = scalarltsel,
|
|
||||||
JOIN = scalarltjoinsel);
|
|
||||||
|
|
||||||
CREATE OPERATOR >(
|
|
||||||
PROCEDURE = _varchar_ci_greater_than,
|
|
||||||
LEFTARG = varchar_ci,
|
|
||||||
RIGHTARG = varchar_ci,
|
|
||||||
COMMUTATOR = <,
|
|
||||||
NEGATOR = <=,
|
|
||||||
RESTRICT = scalargtsel,
|
|
||||||
JOIN = scalargtjoinsel);
|
|
||||||
|
|
||||||
CREATE OPERATOR >=(
|
|
||||||
PROCEDURE = _varchar_ci_greater_equals,
|
|
||||||
LEFTARG = varchar_ci,
|
|
||||||
RIGHTARG = varchar_ci,
|
|
||||||
COMMUTATOR = <=,
|
|
||||||
NEGATOR = <,
|
|
||||||
RESTRICT = scalargtsel,
|
|
||||||
JOIN = scalargtjoinsel);
|
|
||||||
|
|
||||||
CREATE OPERATOR <>(
|
|
||||||
PROCEDURE = _varchar_ci_not_equal,
|
|
||||||
LEFTARG = varchar_ci,
|
|
||||||
RIGHTARG = varchar_ci,
|
|
||||||
COMMUTATOR = <>,
|
|
||||||
NEGATOR = =,
|
|
||||||
RESTRICT = neqsel,
|
|
||||||
JOIN = neqjoinsel);
|
|
||||||
|
|
||||||
CREATE OPERATOR =(
|
|
||||||
PROCEDURE = _varchar_ci_equal,
|
|
||||||
LEFTARG = varchar_ci,
|
|
||||||
RIGHTARG = varchar_ci,
|
|
||||||
COMMUTATOR = =,
|
|
||||||
NEGATOR = <>,
|
|
||||||
RESTRICT = eqsel,
|
|
||||||
JOIN = eqjoinsel,
|
|
||||||
HASHES,
|
|
||||||
MERGES,
|
|
||||||
SORT1= <);
|
|
||||||
|
|
||||||
COMMIT;
|
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +0,0 @@
|
|||||||
# DO NOT EDIT THIS FILE, IT IS GENERATED
|
|
||||||
#
|
|
||||||
# To change the contents of this file, edit
|
|
||||||
# phpBB/develop/create_schema_files.php and
|
|
||||||
# run it.
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
$dbms = 'phpbb\\db\\driver\\mysqli';
|
|
||||||
$dbhost = 'localhost';
|
|
||||||
$dbport = '';
|
|
||||||
$dbname = 'phpbb_test';
|
|
||||||
$dbuser = 'root';
|
|
||||||
$dbpasswd = '';
|
|
||||||
@@ -11,6 +11,11 @@ namespace board3\portal\tests\testframework;
|
|||||||
|
|
||||||
abstract class database_test_case extends \phpbb_database_test_case
|
abstract class database_test_case extends \phpbb_database_test_case
|
||||||
{
|
{
|
||||||
|
static protected function setup_extensions()
|
||||||
|
{
|
||||||
|
return array('board3/portal');
|
||||||
|
}
|
||||||
|
|
||||||
protected $db;
|
protected $db;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp()
|
||||||
@@ -19,31 +24,4 @@ abstract class database_test_case extends \phpbb_database_test_case
|
|||||||
global $db;
|
global $db;
|
||||||
$db = $this->db = $this->new_dbal();
|
$db = $this->db = $this->new_dbal();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function create_connection_manager($config)
|
|
||||||
{
|
|
||||||
return new \board3\portal\tests\testframework\database_test_connection_manager($config);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function get_database_config()
|
|
||||||
{
|
|
||||||
$config = \board3\portal\tests\testframework\test_case_helpers::get_test_config();
|
|
||||||
|
|
||||||
if (!isset($config['dbms']))
|
|
||||||
{
|
|
||||||
$this->markTestSkipped('Missing test_config.php: See first error.');
|
|
||||||
}
|
|
||||||
|
|
||||||
return $config;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function get_test_case_helpers()
|
|
||||||
{
|
|
||||||
if (!$this->test_case_helpers)
|
|
||||||
{
|
|
||||||
$this->test_case_helpers = new \board3\portal\tests\testframework\test_case_helpers($this);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->test_case_helpers;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @package phpBB Gallery Testing
|
|
||||||
* @copyright (c) 2013 nickvergessen
|
|
||||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace board3\portal\tests\testframework;
|
|
||||||
|
|
||||||
class database_test_connection_manager extends \phpbb_database_test_connection_manager
|
|
||||||
{
|
|
||||||
public function load_schema($db)
|
|
||||||
{
|
|
||||||
$this->ensure_connected(__METHOD__);
|
|
||||||
|
|
||||||
$directory = dirname(__FILE__) . '/../schemas/';
|
|
||||||
$this->load_schema_from_file($directory, $db);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -11,55 +11,8 @@ namespace board3\portal\tests\testframework;
|
|||||||
|
|
||||||
abstract class functional_test_case extends \phpbb_functional_test_case
|
abstract class functional_test_case extends \phpbb_functional_test_case
|
||||||
{
|
{
|
||||||
protected $portal_enabled = false;
|
static protected function setup_extensions()
|
||||||
|
|
||||||
public function enable_board3_portal_ext()
|
|
||||||
{
|
{
|
||||||
$enable_portal = false;
|
return array('board3/portal');
|
||||||
|
|
||||||
if ($this->portal_enabled === true || $this->check_if_enabled())
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&sid=' . $this->sid);
|
|
||||||
$disabled_extensions = $crawler->filter('tr.ext_disabled')->extract(array('_text'));
|
|
||||||
foreach ($disabled_extensions as $extension)
|
|
||||||
{
|
|
||||||
if (strpos($extension, 'Board3 Portal') !== false)
|
|
||||||
{
|
|
||||||
$enable_portal = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($enable_portal)
|
|
||||||
{
|
|
||||||
$crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=enable_pre&ext_name=board3%2fportal&sid=' . $this->sid);
|
|
||||||
$form = $crawler->selectButton('Enable')->form();
|
|
||||||
$crawler = self::submit($form);
|
|
||||||
$this->assertContains('The extension was enabled successfully', $crawler->text());
|
|
||||||
$this->portal_enabled = true;
|
|
||||||
$this->set_enabled();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function check_if_enabled()
|
|
||||||
{
|
|
||||||
$this->db = $this->get_db();
|
|
||||||
|
|
||||||
$sql = "SELECT config_value FROM phpbb_config WHERE config_name = 'b3p_ext_enabled'";
|
|
||||||
$result = $this->db->sql_query($sql);
|
|
||||||
$enabled = $this->db->sql_fetchfield('config_value');
|
|
||||||
$this->db->sql_freeresult($result);
|
|
||||||
|
|
||||||
return $enabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function set_enabled()
|
|
||||||
{
|
|
||||||
$this->db = $this->get_db();
|
|
||||||
|
|
||||||
$sql = "INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('b3p_ext_enabled', 1, 1)";
|
|
||||||
$this->db->sql_query($sql);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,13 +11,4 @@ namespace board3\portal\tests\testframework;
|
|||||||
|
|
||||||
abstract class test_case extends \phpbb_test_case
|
abstract class test_case extends \phpbb_test_case
|
||||||
{
|
{
|
||||||
public function get_test_case_helpers()
|
|
||||||
{
|
|
||||||
if (!$this->test_case_helpers)
|
|
||||||
{
|
|
||||||
$this->test_case_helpers = new \board3\portal\tests\testframework\test_case_helpers($this);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->test_case_helpers;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,116 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @package phpBB Gallery Testing
|
|
||||||
* @copyright (c) 2013 nickvergessen
|
|
||||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace board3\portal\tests\testframework;
|
|
||||||
|
|
||||||
class test_case_helpers extends \phpbb_test_case_helpers
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Copied from phpbb_test_case_helpers::get_test_config() to fix some paths
|
|
||||||
*/
|
|
||||||
static public function get_test_config()
|
|
||||||
{
|
|
||||||
$config = array();
|
|
||||||
|
|
||||||
if (extension_loaded('sqlite') && version_compare(\PHPUnit_Runner_Version::id(), '3.4.15', '>='))
|
|
||||||
{
|
|
||||||
$config = array_merge($config, array(
|
|
||||||
'dbms' => 'phpbb_db_driver_sqlite',
|
|
||||||
'dbhost' => dirname(__FILE__) . '/../phpbb_unit_tests.sqlite2', // filename
|
|
||||||
'dbport' => '',
|
|
||||||
'dbname' => '',
|
|
||||||
'dbuser' => '',
|
|
||||||
'dbpasswd' => '',
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($_SERVER['PHPBB_TEST_CONFIG']))
|
|
||||||
{
|
|
||||||
// Could be an absolute path
|
|
||||||
$test_config = $_SERVER['PHPBB_TEST_CONFIG'];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$test_config = dirname(__FILE__) . '/../test_config.php';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (file_exists($test_config))
|
|
||||||
{
|
|
||||||
include($test_config);
|
|
||||||
|
|
||||||
if (!function_exists('phpbb_convert_30_dbms_to_31'))
|
|
||||||
{
|
|
||||||
global $phpbb_root_path;
|
|
||||||
require_once $phpbb_root_path . 'includes/functions.php';
|
|
||||||
}
|
|
||||||
|
|
||||||
$config = array_merge($config, array(
|
|
||||||
'dbms' => phpbb_convert_30_dbms_to_31($dbms),
|
|
||||||
'dbhost' => $dbhost,
|
|
||||||
'dbport' => $dbport,
|
|
||||||
'dbname' => $dbname,
|
|
||||||
'dbuser' => $dbuser,
|
|
||||||
'dbpasswd' => $dbpasswd,
|
|
||||||
'custom_dsn' => isset($custom_dsn) ? $custom_dsn : '',
|
|
||||||
));
|
|
||||||
|
|
||||||
if (isset($phpbb_functional_url))
|
|
||||||
{
|
|
||||||
$config['phpbb_functional_url'] = $phpbb_functional_url;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($phpbb_redis_host))
|
|
||||||
{
|
|
||||||
$config['redis_host'] = $phpbb_redis_host;
|
|
||||||
}
|
|
||||||
if (isset($phpbb_redis_port))
|
|
||||||
{
|
|
||||||
$config['redis_port'] = $phpbb_redis_port;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($_SERVER['PHPBB_TEST_DBMS']))
|
|
||||||
{
|
|
||||||
if (!function_exists('phpbb_convert_30_dbms_to_31'))
|
|
||||||
{
|
|
||||||
global $phpbb_root_path;
|
|
||||||
require_once $phpbb_root_path . 'includes/functions.php';
|
|
||||||
}
|
|
||||||
|
|
||||||
$config = array_merge($config, array(
|
|
||||||
'dbms' => isset($_SERVER['PHPBB_TEST_DBMS']) ? phpbb_convert_30_dbms_to_31($_SERVER['PHPBB_TEST_DBMS']) : '',
|
|
||||||
'dbhost' => isset($_SERVER['PHPBB_TEST_DBHOST']) ? $_SERVER['PHPBB_TEST_DBHOST'] : '',
|
|
||||||
'dbport' => isset($_SERVER['PHPBB_TEST_DBPORT']) ? $_SERVER['PHPBB_TEST_DBPORT'] : '',
|
|
||||||
'dbname' => isset($_SERVER['PHPBB_TEST_DBNAME']) ? $_SERVER['PHPBB_TEST_DBNAME'] : '',
|
|
||||||
'dbuser' => isset($_SERVER['PHPBB_TEST_DBUSER']) ? $_SERVER['PHPBB_TEST_DBUSER'] : '',
|
|
||||||
'dbpasswd' => isset($_SERVER['PHPBB_TEST_DBPASSWD']) ? $_SERVER['PHPBB_TEST_DBPASSWD'] : '',
|
|
||||||
'custom_dsn' => isset($_SERVER['PHPBB_TEST_CUSTOM_DSN']) ? $_SERVER['PHPBB_TEST_CUSTOM_DSN'] : '',
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($_SERVER['PHPBB_FUNCTIONAL_URL']))
|
|
||||||
{
|
|
||||||
$config = array_merge($config, array(
|
|
||||||
'phpbb_functional_url' => isset($_SERVER['PHPBB_FUNCTIONAL_URL']) ? $_SERVER['PHPBB_FUNCTIONAL_URL'] : '',
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($_SERVER['PHPBB_TEST_REDIS_HOST']))
|
|
||||||
{
|
|
||||||
$config['redis_host'] = $_SERVER['PHPBB_TEST_REDIS_HOST'];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($_SERVER['PHPBB_TEST_REDIS_PORT']))
|
|
||||||
{
|
|
||||||
$config['redis_port'] = $_SERVER['PHPBB_TEST_REDIS_PORT'];
|
|
||||||
}
|
|
||||||
|
|
||||||
return $config;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -15,7 +15,8 @@ class phpbb_functions_check_file_src_test extends \board3\portal\tests\testframe
|
|||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
global $db, $phpbb_root_path, $phpEx, $user;
|
|
||||||
|
global $user;
|
||||||
$user = new phpbb_mock_user();
|
$user = new phpbb_mock_user();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,16 +9,22 @@
|
|||||||
|
|
||||||
require_once(dirname(__FILE__) . '/../../../includes/functions.php');
|
require_once(dirname(__FILE__) . '/../../../includes/functions.php');
|
||||||
|
|
||||||
class phpbb_functions_simple_test extends PHPUnit_Framework_TestCase
|
class phpbb_functions_simple_test extends \board3\portal\tests\testframework\test_case
|
||||||
{
|
{
|
||||||
|
protected $path_helper;
|
||||||
|
protected $calendar;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
|
parent::setUp();
|
||||||
|
global $phpbb_root_path;
|
||||||
|
|
||||||
$this->path_helper = new \phpbb\path_helper(
|
$this->path_helper = new \phpbb\path_helper(
|
||||||
new \phpbb\symfony_request(
|
new \phpbb\symfony_request(
|
||||||
new phpbb_mock_request()
|
new phpbb_mock_request()
|
||||||
),
|
),
|
||||||
new \phpbb\filesystem(),
|
new \phpbb\filesystem(),
|
||||||
$this->phpbb_root_path,
|
$phpbb_root_path,
|
||||||
'php'
|
'php'
|
||||||
);
|
);
|
||||||
$this->calendar = new \board3\portal\modules\calendar(array(), null, null, null, dirname(__FILE__) . '/../../../', 'php', null, $this->path_helper);
|
$this->calendar = new \board3\portal\modules\calendar(array(), null, null, null, dirname(__FILE__) . '/../../../', 'php', null, $this->path_helper);
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# @copyright (c) 2013 phpBB Group
|
|
||||||
# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
|
||||||
#
|
|
||||||
set -e
|
|
||||||
|
|
||||||
function add_ext_to_php_ini
|
|
||||||
{
|
|
||||||
echo "extension=$1.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
|
|
||||||
}
|
|
||||||
|
|
||||||
# redis
|
|
||||||
git clone git://github.com/nicolasff/phpredis.git
|
|
||||||
cd phpredis
|
|
||||||
phpize
|
|
||||||
./configure
|
|
||||||
make
|
|
||||||
make install
|
|
||||||
cd ..
|
|
||||||
add_ext_to_php_ini 'redis'
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
<?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"
|
|
||||||
verbose="true"
|
|
||||||
bootstrap="../tests/bootstrap.php">
|
|
||||||
<testsuites>
|
|
||||||
<testsuite name="phpBB Test Suite">
|
|
||||||
<directory suffix="_test.php">../tests</directory>
|
|
||||||
<exclude>../tests/functional</exclude>
|
|
||||||
<exclude>../tests/lint_test.php</exclude>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="phpBB Functional Tests">
|
|
||||||
<directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">../tests/functional</directory>
|
|
||||||
</testsuite>
|
|
||||||
</testsuites>
|
|
||||||
|
|
||||||
<groups>
|
|
||||||
<exclude>
|
|
||||||
<group>slow</group>
|
|
||||||
</exclude>
|
|
||||||
</groups>
|
|
||||||
|
|
||||||
<php>
|
|
||||||
<server name="PHPBB_TEST_DBMS" value="mysqli" />
|
|
||||||
<server name="PHPBB_TEST_DBHOST" value="0.0.0.0" />
|
|
||||||
<server name="PHPBB_TEST_DBPORT" value="3306" />
|
|
||||||
<server name="PHPBB_TEST_DBNAME" value="phpbb_tests" />
|
|
||||||
<server name="PHPBB_TEST_DBUSER" value="root" />
|
|
||||||
<server name="PHPBB_TEST_DBPASSWD" value="" />
|
|
||||||
<server name="PHPBB_TEST_TABLE_PREFIX" value="phpbb_"/>
|
|
||||||
<server name="PHPBB_FUNCTIONAL_URL" value="http://localhost/" />
|
|
||||||
</php>
|
|
||||||
</phpunit>
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
<?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"
|
|
||||||
verbose="true"
|
|
||||||
bootstrap="../tests/bootstrap.php">
|
|
||||||
<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.19" phpVersionOperator=">=">../tests/functional</directory>
|
|
||||||
</testsuite>
|
|
||||||
</testsuites>
|
|
||||||
|
|
||||||
<groups>
|
|
||||||
<exclude>
|
|
||||||
<group>slow</group>
|
|
||||||
</exclude>
|
|
||||||
</groups>
|
|
||||||
|
|
||||||
<php>
|
|
||||||
<server name="PHPBB_TEST_DBMS" value="phpbb\db\driver\mysqli" />
|
|
||||||
<server name="PHPBB_TEST_DBHOST" value="0.0.0.0" />
|
|
||||||
<server name="PHPBB_TEST_DBPORT" value="3306" />
|
|
||||||
<server name="PHPBB_TEST_DBNAME" value="phpbb_tests" />
|
|
||||||
<server name="PHPBB_TEST_DBUSER" value="root" />
|
|
||||||
<server name="PHPBB_TEST_DBPASSWD" value="" />
|
|
||||||
<server name="PHPBB_TEST_REDIS_HOST" value="localhost" />
|
|
||||||
<server name="PHPBB_TEST_TABLE_PREFIX" value="phpbb_"/>
|
|
||||||
<server name="PHPBB_FUNCTIONAL_URL" value="http://localhost/" />
|
|
||||||
</php>
|
|
||||||
</phpunit>
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
<?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"
|
|
||||||
verbose="true"
|
|
||||||
bootstrap="../tests/bootstrap.php">
|
|
||||||
<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.19" phpVersionOperator=">=">../tests/functional</directory>
|
|
||||||
</testsuite>
|
|
||||||
</testsuites>
|
|
||||||
|
|
||||||
<groups>
|
|
||||||
<exclude>
|
|
||||||
<group>slow</group>
|
|
||||||
</exclude>
|
|
||||||
</groups>
|
|
||||||
|
|
||||||
<php>
|
|
||||||
<!-- "Real" test database -->
|
|
||||||
<!-- uncomment, otherwise sqlite memory runs -->
|
|
||||||
<server name="PHPBB_TEST_DBMS" value="phpbb\db\driver\postgres"/>
|
|
||||||
<server name="PHPBB_TEST_DBHOST" value="localhost" />
|
|
||||||
<server name="PHPBB_TEST_DBPORT" value="5432" />
|
|
||||||
<server name="PHPBB_TEST_DBNAME" value="phpbb_tests" />
|
|
||||||
<server name="PHPBB_TEST_DBUSER" value="postgres" />
|
|
||||||
<server name="PHPBB_TEST_DBPASSWD" value="" />
|
|
||||||
<server name="PHPBB_TEST_REDIS_HOST" value="localhost" />
|
|
||||||
<server name="PHPBB_TEST_TABLE_PREFIX" value="phpbb_"/>
|
|
||||||
<server name="PHPBB_FUNCTIONAL_URL" value="http://localhost/" />
|
|
||||||
</php>
|
|
||||||
</phpunit>
|
|
||||||
24
travis/prepare-phpbb.sh
Executable file
24
travis/prepare-phpbb.sh
Executable file
@@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# This file is part of the phpBB Forum Software package.
|
||||||
|
#
|
||||||
|
# @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||||
|
# @license GNU General Public License, version 2 (GPL-2.0)
|
||||||
|
#
|
||||||
|
# For full copyright and license information, please see
|
||||||
|
# the docs/CREDITS.txt file.
|
||||||
|
#
|
||||||
|
set -e
|
||||||
|
set -x
|
||||||
|
|
||||||
|
EXTNAME=$1
|
||||||
|
BRANCH=$2
|
||||||
|
EXTPATH_TEMP=$3
|
||||||
|
|
||||||
|
# Copy extension to a temp folder
|
||||||
|
mkdir ../../tmp
|
||||||
|
cp -R . ../../tmp
|
||||||
|
cd ../../
|
||||||
|
|
||||||
|
# Clone phpBB
|
||||||
|
git clone --depth=1 "git://github.com/nickvergessen/phpbb.git" "phpBB3" --branch=$BRANCH
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# @copyright (c) 2013 phpBB Group
|
|
||||||
# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
|
||||||
#
|
|
||||||
set -e
|
|
||||||
set -x
|
|
||||||
|
|
||||||
# MariaDB Series
|
|
||||||
VERSION='5.5'
|
|
||||||
|
|
||||||
# Operating system codename, e.g. "precise"
|
|
||||||
OS_CODENAME=$(lsb_release --codename --short)
|
|
||||||
|
|
||||||
# Manually purge MySQL to remove conflicting files (e.g. /etc/mysql/my.cnf)
|
|
||||||
sudo apt-get purge -qq mysql-common
|
|
||||||
|
|
||||||
if ! which add-apt-repository > /dev/null
|
|
||||||
then
|
|
||||||
sudo apt-get update -qq
|
|
||||||
sudo apt-get install -qq python-software-properties
|
|
||||||
fi
|
|
||||||
|
|
||||||
MIRROR_DOMAIN='ftp.osuosl.org'
|
|
||||||
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
|
|
||||||
sudo add-apt-repository "deb http://$MIRROR_DOMAIN/pub/mariadb/repo/$VERSION/ubuntu $OS_CODENAME main"
|
|
||||||
sudo apt-get update -qq
|
|
||||||
|
|
||||||
# Pin repository in order to avoid conflicts with MySQL from distribution
|
|
||||||
# repository. See https://mariadb.com/kb/en/installing-mariadb-deb-files
|
|
||||||
# section "Version Mismatch Between MariaDB and Ubuntu/Debian Repositories"
|
|
||||||
echo "
|
|
||||||
Package: *
|
|
||||||
Pin: origin $MIRROR_DOMAIN
|
|
||||||
Pin-Priority: 1000
|
|
||||||
" | sudo tee /etc/apt/preferences.d/mariadb
|
|
||||||
|
|
||||||
sudo debconf-set-selections <<< "mariadb-server-$VERSION mysql-server/root_password password rootpasswd"
|
|
||||||
sudo debconf-set-selections <<< "mariadb-server-$VERSION mysql-server/root_password_again password rootpasswd"
|
|
||||||
sudo apt-get install -qq mariadb-server
|
|
||||||
|
|
||||||
# Set root password to empty string.
|
|
||||||
echo "
|
|
||||||
USE mysql;
|
|
||||||
UPDATE user SET Password = PASSWORD('') where User = 'root';
|
|
||||||
FLUSH PRIVILEGES;
|
|
||||||
" | mysql -u root -prootpasswd
|
|
||||||
|
|
||||||
mysql --version
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# @copyright (c) 2013 phpBB Group
|
|
||||||
# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
|
||||||
#
|
|
||||||
set -e
|
|
||||||
set -x
|
|
||||||
|
|
||||||
sudo apt-get update -qq
|
|
||||||
sudo apt-get install -qq nginx realpath
|
|
||||||
|
|
||||||
sudo service nginx stop
|
|
||||||
|
|
||||||
DIR=$(dirname "$0")
|
|
||||||
PHPBB_ROOT_PATH=$(realpath "$DIR/../../../..")
|
|
||||||
|
|
||||||
NGINX_CONF="/etc/nginx/sites-enabled/default"
|
|
||||||
|
|
||||||
PHP_FPM_BIN="$HOME/.phpenv/versions/$TRAVIS_PHP_VERSION/sbin/php-fpm"
|
|
||||||
PHP_FPM_CONF="$DIR/php-fpm.conf"
|
|
||||||
PHP_FPM_SOCK=$(realpath "$DIR")/php-fpm.sock
|
|
||||||
|
|
||||||
USER=$(whoami)
|
|
||||||
|
|
||||||
# php-fpm configuration
|
|
||||||
echo "
|
|
||||||
[global]
|
|
||||||
|
|
||||||
[travis]
|
|
||||||
user = $USER
|
|
||||||
group = $USER
|
|
||||||
listen = $PHP_FPM_SOCK
|
|
||||||
pm = static
|
|
||||||
pm.max_children = 2
|
|
||||||
|
|
||||||
php_admin_value[memory_limit] = 128M
|
|
||||||
" > $PHP_FPM_CONF
|
|
||||||
|
|
||||||
# nginx configuration
|
|
||||||
echo "
|
|
||||||
server {
|
|
||||||
listen 80;
|
|
||||||
root $PHPBB_ROOT_PATH/;
|
|
||||||
index index.php index.html;
|
|
||||||
|
|
||||||
location ~ \.php$ {
|
|
||||||
fastcgi_pass unix:$PHP_FPM_SOCK;
|
|
||||||
include fastcgi_params;
|
|
||||||
}
|
|
||||||
|
|
||||||
location / {
|
|
||||||
try_files \$uri \$uri/ /app.php\$is_args\$args;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
" | sudo tee $NGINX_CONF > /dev/null
|
|
||||||
|
|
||||||
# Start daemons
|
|
||||||
sudo $PHP_FPM_BIN --fpm-config "$DIR/php-fpm.conf"
|
|
||||||
sudo service nginx start
|
|
||||||
Reference in New Issue
Block a user