Merge pull request #693 from marc1706/ticket/690
[ticket/690] Apply Kirk's changes and fix pagination
This commit is contained in:
414
.github/workflows/tests.yml
vendored
Normal file
414
.github/workflows/tests.yml
vendored
Normal file
@@ -0,0 +1,414 @@
|
||||
name: Tests
|
||||
|
||||
env:
|
||||
EXTNAME: board3/portal # Your extension vendor/package name
|
||||
SNIFF: 1 # Run code sniffer on your code? 1 or 0
|
||||
IMAGE_ICC: 0 # Run icc profile sniffer on your images? 1 or 0
|
||||
EPV: 1 # Run EPV (Extension Pre Validator) on your code? 1 or 0
|
||||
EXECUTABLE_FILES: 1 # Run check for executable files? 1 or 0
|
||||
PHPBB_BRANCH: 3.3.x # The phpBB branch to run tests on
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: # Run tests when commits are pushed to these branches in your repo
|
||||
- master
|
||||
pull_request: # Run tests when pull requests are made on these branches in your repo
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
# START Basic Checks Job (EPV, code sniffer, images check, etc.)
|
||||
basic-checks:
|
||||
runs-on: ubuntu-18.04
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- php: '7.1'
|
||||
db: "none"
|
||||
NOTESTS: 1
|
||||
|
||||
name: PHP ${{ matrix.php }} - ${{ matrix.db }}
|
||||
|
||||
steps:
|
||||
- name: Checkout phpBB
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: phpbb/phpbb
|
||||
ref: ${{ env.PHPBB_BRANCH }}
|
||||
path: phpBB3
|
||||
|
||||
- name: Checkout extension
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: phpBB3/phpBB/ext/${{ env.EXTNAME }}
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, mysqli, sqlite, pdo_sqlite, intl, gd, exif, iconv, sqlsrv, pdo_sqlsrv, ldap
|
||||
coverage: none
|
||||
|
||||
- name: Setup environment for phpBB
|
||||
env:
|
||||
DB: ${{ matrix.db }}
|
||||
PHP_VERSION: ${{ matrix.php }}
|
||||
NOTESTS: '1'
|
||||
run: .github/setup-phpbb.sh $DB $PHP_VERSION $NOTESTS
|
||||
working-directory: ./phpBB3
|
||||
|
||||
- name: Setup EPV
|
||||
if: ${{ env.EPV != 0 }}
|
||||
run: composer require phpbb/epv:dev-master --dev --no-interaction --ignore-platform-reqs
|
||||
working-directory: ./phpBB3/phpBB
|
||||
|
||||
- name: Run code sniffer
|
||||
if: ${{ env.SNIFF != 0 }}
|
||||
env:
|
||||
NOTESTS: '1'
|
||||
run: .github/ext-sniff.sh $EXTNAME $NOTESTS
|
||||
working-directory: ./phpBB3
|
||||
|
||||
- name: Check image ICC profiles
|
||||
if: ${{ env.IMAGE_ICC != 0 }}
|
||||
run: .github/check-image-icc-profiles.sh
|
||||
working-directory: ./phpBB3
|
||||
|
||||
- name: Check executable files
|
||||
if: ${{ env.EXECUTABLE_FILES != 0 }}
|
||||
run: .github/ext-check-executable-files.sh ./ $EXTNAME
|
||||
working-directory: ./phpBB3
|
||||
|
||||
- name: Run EPV
|
||||
if: ${{ env.EPV != 0 }}
|
||||
run: phpBB/vendor/bin/EPV.php run --dir="phpBB/ext/$EXTNAME/"
|
||||
working-directory: ./phpBB3
|
||||
# END Basic Checks Job
|
||||
|
||||
# START MySQL and MariaDB Job
|
||||
mysql-tests:
|
||||
runs-on: ubuntu-18.04
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- php: '7.1'
|
||||
db: "mariadb:10.1"
|
||||
- php: '7.1'
|
||||
db: "mariadb:10.2"
|
||||
- php: '7.1'
|
||||
db: "mariadb:10.3"
|
||||
- php: '7.1'
|
||||
db: "mariadb:10.4"
|
||||
- php: '7.1'
|
||||
db: "mariadb:10.5"
|
||||
- php: '7.1'
|
||||
db: "mysql:5.6"
|
||||
db_alias: "MyISAM Tests"
|
||||
MYISAM: 1
|
||||
- php: '7.1'
|
||||
db: "mysql:5.6"
|
||||
- php: '7.1'
|
||||
db: "mysql:5.7"
|
||||
- php: '7.2'
|
||||
db: "mysql:5.7"
|
||||
- php: '7.3'
|
||||
db: "mysql:5.7"
|
||||
- php: '7.4'
|
||||
db: "mysql:5.7"
|
||||
- php: '7.4'
|
||||
db: "mysql:8.0"
|
||||
- php: '8.0'
|
||||
db: "mysql:5.7"
|
||||
- php: '8.1'
|
||||
db: "mysql:5.7"
|
||||
|
||||
name: PHP ${{ matrix.php }} - ${{ matrix.db_alias != '' && matrix.db_alias || matrix.db }}
|
||||
|
||||
services:
|
||||
mysql:
|
||||
image: ${{ matrix.db }}
|
||||
env:
|
||||
MYSQL_ALLOW_EMPTY_PASSWORD: yes
|
||||
MYSQL_DATABASE: phpbb_tests
|
||||
ports:
|
||||
- 3306:3306
|
||||
options: >-
|
||||
--health-cmd="mysqladmin ping"
|
||||
--health-interval=10s
|
||||
--health-timeout=5s
|
||||
--health-retries=3
|
||||
|
||||
redis:
|
||||
image: redis
|
||||
options: >-
|
||||
--health-cmd "redis-cli ping"
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
ports:
|
||||
- 6379:6379
|
||||
|
||||
steps:
|
||||
- name: Checkout phpBB
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: phpbb/phpbb
|
||||
ref: ${{ env.PHPBB_BRANCH }}
|
||||
path: phpBB3
|
||||
|
||||
- name: Checkout extension
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: phpBB3/phpBB/ext/${{ env.EXTNAME }}
|
||||
|
||||
- id: database-type
|
||||
env:
|
||||
MATRIX_DB: ${{ matrix.db }}
|
||||
run: |
|
||||
db=$(echo "${MATRIX_DB%%:*}")
|
||||
echo "::set-output name=db::$db"
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, mysqli, sqlite, pdo_sqlite, intl, gd, exif, iconv, sqlsrv, pdo_sqlsrv, ldap
|
||||
coverage: none
|
||||
|
||||
- name: Setup environment for phpBB
|
||||
env:
|
||||
DB: ${{steps.database-type.outputs.db}}
|
||||
PHP_VERSION: ${{ matrix.php }}
|
||||
NOTESTS: '0'
|
||||
run: .github/setup-phpbb.sh $DB $PHP_VERSION ${NOTESTS:-0}
|
||||
working-directory: ./phpBB3
|
||||
|
||||
- name: Setup Extension composer dependencies
|
||||
run: composer install
|
||||
working-directory: phpBB3/phpBB/ext/${{ env.EXTNAME }}
|
||||
|
||||
- name: Setup database
|
||||
env:
|
||||
DB: ${{steps.database-type.outputs.db}}
|
||||
MYISAM: ${{ matrix.MYISAM != 1 && '0' || '1' }}
|
||||
run: .github/setup-database.sh $DB $MYISAM
|
||||
working-directory: ./phpBB3
|
||||
|
||||
- name: Setup PHPUnit files
|
||||
run: mkdir -p phpBB/ext/$EXTNAME/.github && cp .github/phpunit* $_
|
||||
working-directory: ./phpBB3
|
||||
|
||||
- name: Run unit tests
|
||||
env:
|
||||
DB: ${{steps.database-type.outputs.db}}
|
||||
run: phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php
|
||||
working-directory: ./phpBB3
|
||||
# END MySQL and MariaDB Job
|
||||
|
||||
# START PostgreSQL Job
|
||||
postgres-tests:
|
||||
runs-on: ubuntu-18.04
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- php: '7.1'
|
||||
db: "postgres:9.5"
|
||||
- php: '7.1'
|
||||
db: "postgres:9.6"
|
||||
- php: '7.1'
|
||||
db: "postgres:10"
|
||||
- php: '7.1'
|
||||
db: "postgres:11"
|
||||
- php: '7.1'
|
||||
db: "postgres:12"
|
||||
- php: '7.1'
|
||||
db: "postgres:13"
|
||||
|
||||
name: PHP ${{ matrix.php }} - ${{ matrix.db }}
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: ${{ matrix.db != 'postgres:9.5' && matrix.db != 'postgres:9.6' && matrix.db != 'postgres:10' && matrix.db != 'postgres:11' && matrix.db != 'postgres:12' && matrix.db != 'postgres:13' && 'postgres:10' || matrix.db }}
|
||||
env:
|
||||
POSTGRES_HOST: localhost
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
ports:
|
||||
- 5432:5432
|
||||
options: >-
|
||||
-v /var/run/postgresql:/var/run/postgresql
|
||||
--health-cmd pg_isready
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
|
||||
redis:
|
||||
image: redis
|
||||
options: >-
|
||||
--health-cmd "redis-cli ping"
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
ports:
|
||||
- 6379:6379
|
||||
|
||||
steps:
|
||||
- name: Checkout phpBB
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: phpbb/phpbb
|
||||
ref: ${{ env.PHPBB_BRANCH }}
|
||||
path: phpBB3
|
||||
|
||||
- name: Checkout extension
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: phpBB3/phpBB/ext/${{ env.EXTNAME }}
|
||||
|
||||
- id: database-type
|
||||
env:
|
||||
MATRIX_DB: ${{ matrix.db }}
|
||||
run: |
|
||||
db=$(echo "${MATRIX_DB%%:*}")
|
||||
echo "::set-output name=db::$db"
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, mysqli, sqlite, pdo_sqlite, intl, gd, exif, iconv, sqlsrv, pdo_sqlsrv, ldap
|
||||
coverage: none
|
||||
|
||||
- name: Setup environment for phpBB
|
||||
env:
|
||||
DB: ${{steps.database-type.outputs.db}}
|
||||
PHP_VERSION: ${{ matrix.php }}
|
||||
NOTESTS: '0'
|
||||
run: .github/setup-phpbb.sh $DB $PHP_VERSION ${NOTESTS:-0}
|
||||
working-directory: ./phpBB3
|
||||
|
||||
- name: Setup Extension composer dependencies
|
||||
run: composer install
|
||||
working-directory: phpBB3/phpBB/ext/${{ env.EXTNAME }}
|
||||
|
||||
- name: Setup database
|
||||
env:
|
||||
DB: ${{steps.database-type.outputs.db}}
|
||||
MYISAM: '0'
|
||||
run: .github/setup-database.sh $DB $MYISAM
|
||||
working-directory: ./phpBB3
|
||||
|
||||
- name: Setup PHPUnit files
|
||||
run: mkdir -p phpBB/ext/$EXTNAME/.github && cp .github/phpunit* $_
|
||||
working-directory: ./phpBB3
|
||||
|
||||
- name: Run unit tests
|
||||
env:
|
||||
DB: ${{steps.database-type.outputs.db}}
|
||||
run: phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php
|
||||
working-directory: ./phpBB3
|
||||
# END PostgreSQL Job
|
||||
|
||||
# START Other Tests Job (SQLite 3 and mssql)
|
||||
other-tests:
|
||||
runs-on: ubuntu-18.04
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- php: '7.1'
|
||||
db: "sqlite3"
|
||||
- php: '7.2'
|
||||
db: "mcr.microsoft.com/mssql/server:2017-latest"
|
||||
db_alias: 'MSSQL 2017'
|
||||
- php: '7.2'
|
||||
db: "mcr.microsoft.com/mssql/server:2019-latest"
|
||||
db_alias: 'MSSQL 2019'
|
||||
|
||||
name: PHP ${{ matrix.php }} - ${{ matrix.db_alias != '' && matrix.db_alias || matrix.db }}
|
||||
|
||||
services:
|
||||
mssql:
|
||||
image: ${{ matrix.db != 'mcr.microsoft.com/mssql/server:2017-latest' && matrix.db != 'mcr.microsoft.com/mssql/server:2019-latest' && 'mcr.microsoft.com/mssql/server:2017-latest' || matrix.db }}
|
||||
env:
|
||||
SA_PASSWORD: "Pssw0rd_12"
|
||||
ACCEPT_EULA: "y"
|
||||
ports:
|
||||
- 1433:1433
|
||||
options: >-
|
||||
--health-cmd="/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P 'Pssw0rd_12' -Q \"Use [master]; CREATE DATABASE [phpbb_tests] COLLATE Latin1_General_CI_AS\" || exit 1"
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
--health-start-period 10s
|
||||
|
||||
redis:
|
||||
image: redis
|
||||
options: >-
|
||||
--health-cmd "redis-cli ping"
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
ports:
|
||||
- 6379:6379
|
||||
|
||||
steps:
|
||||
- name: Checkout phpBB
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: phpbb/phpbb
|
||||
ref: ${{ env.PHPBB_BRANCH }}
|
||||
path: phpBB3
|
||||
|
||||
- name: Checkout extension
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: phpBB3/phpBB/ext/${{ env.EXTNAME }}
|
||||
|
||||
- id: database-type
|
||||
env:
|
||||
MATRIX_DB: ${{ matrix.db }}
|
||||
run: |
|
||||
if [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2017-latest' ] || [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2019-latest' ]
|
||||
then
|
||||
db='mssql'
|
||||
else
|
||||
db=$(echo "${MATRIX_DB%%:*}")
|
||||
fi
|
||||
echo "::set-output name=db::$db"
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, mysqli, sqlite, pdo_sqlite, intl, gd, exif, iconv, sqlsrv, pdo_sqlsrv, ldap
|
||||
coverage: none
|
||||
|
||||
- name: Setup environment for phpBB
|
||||
env:
|
||||
DB: ${{steps.database-type.outputs.db}}
|
||||
PHP_VERSION: ${{ matrix.php }}
|
||||
NOTESTS: '0'
|
||||
run: .github/setup-phpbb.sh $DB $PHP_VERSION ${NOTESTS:-0}
|
||||
working-directory: ./phpBB3
|
||||
|
||||
- name: Setup Extension composer dependencies
|
||||
run: composer install
|
||||
working-directory: phpBB3/phpBB/ext/${{ env.EXTNAME }}
|
||||
|
||||
- name: Setup database
|
||||
env:
|
||||
DB: ${{steps.database-type.outputs.db}}
|
||||
MYISAM: '0'
|
||||
run: .github/setup-database.sh $DB $MYISAM
|
||||
working-directory: ./phpBB3
|
||||
|
||||
- name: Setup PHPUnit files
|
||||
run: mkdir -p phpBB/ext/$EXTNAME/.github && cp .github/phpunit* $_
|
||||
working-directory: ./phpBB3
|
||||
|
||||
- name: Run unit tests
|
||||
env:
|
||||
DB: ${{steps.database-type.outputs.db}}
|
||||
run: phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php
|
||||
working-directory: ./phpBB3
|
||||
# END Other Tests Job
|
||||
@@ -125,7 +125,7 @@ class portal_module
|
||||
|
||||
if (!($this->c_class = $this->portal_helper->get_module($module_data['module_classname'])))
|
||||
{
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
|
||||
// Load module language
|
||||
@@ -445,7 +445,7 @@ class portal_module
|
||||
|
||||
if (!($this->c_class = $this->portal_helper->get_module($module_classname)))
|
||||
{
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
|
||||
// Do not add modules that shouldn't be added
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
"name": "board3/portal",
|
||||
"type": "phpbb-extension",
|
||||
"description": "Adds a portal with several blocks to your forum. You can change the settings, move the blocks, add new blocks and more in the ACP.",
|
||||
"homepage": "http://www.board3.de",
|
||||
"version": "2.1.0",
|
||||
"homepage": "https://www.board3.de",
|
||||
"version": "2.3.0",
|
||||
"time": "2015-08-04 12:49:14",
|
||||
"license": "GPL-2.0",
|
||||
"license": "GPL-2.0-only",
|
||||
"authors": [{
|
||||
"name": "Marc Alexander",
|
||||
"email": "admin@m-a-styles.de",
|
||||
"homepage": "http://www.m-a-styles.de",
|
||||
"role": "Lead Developer"
|
||||
},
|
||||
},
|
||||
{
|
||||
"name": "Joas Schilling",
|
||||
"email": "nickvergessen@gmx.de",
|
||||
@@ -19,8 +19,8 @@
|
||||
"role": "Developer"
|
||||
}],
|
||||
"require": {
|
||||
"php": ">=5.3.9",
|
||||
"marc1706/phpbb-text-shortener": "^0.1.0"
|
||||
"php": ">=7.1.3",
|
||||
"marc1706/phpbb-text-shortener": "^0.2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpbb/epv": "dev-master"
|
||||
@@ -28,7 +28,7 @@
|
||||
"extra": {
|
||||
"display-name": "Board3 Portal",
|
||||
"soft-require": {
|
||||
"phpbb/phpbb": ">=3.1.5,<3.2.*@dev"
|
||||
"phpbb/phpbb": ">=3.3.0,<3.4@dev"
|
||||
},
|
||||
"version-check": {
|
||||
"host": "board3.de",
|
||||
|
||||
1618
composer.lock
generated
1618
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,7 @@
|
||||
board3_portal_controller:
|
||||
path: /portal
|
||||
defaults: { _controller: board3.portal.main:handle }
|
||||
defaults:
|
||||
_controller: 'board3.portal.main:handle'
|
||||
|
||||
# This is currently not supported yet
|
||||
# board3_portal_pages_controller:
|
||||
@@ -10,4 +11,5 @@ board3_portal_controller:
|
||||
# Redirect to portal by default
|
||||
board3_portal_redirect_controller:
|
||||
path: /
|
||||
defaults: { _controller: board3.portal.main:handle }
|
||||
defaults:
|
||||
_controller: 'board3.portal.main:handle'
|
||||
|
||||
@@ -2,9 +2,8 @@ imports:
|
||||
- { resource: modules.yml }
|
||||
|
||||
parameters:
|
||||
board3.portal.config.table: %core.table_prefix%portal_config
|
||||
board3.portal.modules.table: %core.table_prefix%portal_modules
|
||||
|
||||
board3.portal.config.table: '%core.table_prefix%portal_config'
|
||||
board3.portal.modules.table: '%core.table_prefix%portal_modules'
|
||||
services:
|
||||
board3.portal.main:
|
||||
class: board3\portal\controller\main
|
||||
|
||||
@@ -173,7 +173,7 @@ function generate_portal_pagination($base_url, $num_items, $per_page, $start_ite
|
||||
$on_page = floor($start_item / $per_page) + 1;
|
||||
$url_delim = (strpos($base_url, '?') === false) ? '?' : '&';
|
||||
|
||||
$page_string = ($on_page == 1) ? '<ul><li class="active"><span>1</span></li>' : '<ul><li><a href="' . $base_url . $anker .'" role="button">1</a></li>';
|
||||
$page_string = ($on_page == 1) ? '<ul><li class="active"><span>1</span></li>' : '<ul><li><a class="button" href="' . $base_url . $anker .'" role="button">1</a></li>';
|
||||
|
||||
if ($total_pages > 5)
|
||||
{
|
||||
@@ -185,7 +185,7 @@ function generate_portal_pagination($base_url, $num_items, $per_page, $start_ite
|
||||
|
||||
for ($i = $start_cnt + 1; $i < $end_cnt; ++$i)
|
||||
{
|
||||
$page_string .= ($i == $on_page) ? '<li class="active"><span>' . $i . '</span></li>' : '<li><a href="' . $base_url . "{$url_delim}" . $pagination_type . '=' . (($i - 1) * $per_page) . $anker . '" role="button">' . $i . '</a></li>';
|
||||
$page_string .= ($i == $on_page) ? '<li class="active"><span>' . $i . '</span></li>' : '<li><a class="button" href="' . $base_url . "{$url_delim}" . $pagination_type . '=' . (($i - 1) * $per_page) . $anker . '" role="button">' . $i . '</a></li>';
|
||||
if ($i < $end_cnt - 1)
|
||||
{
|
||||
$page_string .= $seperator;
|
||||
@@ -201,25 +201,25 @@ function generate_portal_pagination($base_url, $num_items, $per_page, $start_ite
|
||||
|
||||
for ($i = 2; $i < $total_pages; ++$i)
|
||||
{
|
||||
$page_string .= ($i == $on_page) ? '<li class="active"><span>' . $i . '</span></li>' : '<li><a href="' . $base_url . "{$url_delim}" . $pagination_type . '=' . (($i - 1) * $per_page) . $anker . '" role="button">' . $i . '</a></li>';
|
||||
$page_string .= ($i == $on_page) ? '<li class="active"><span>' . $i . '</span></li>' : '<li><a class="button" href="' . $base_url . "{$url_delim}" . $pagination_type . '=' . (($i - 1) * $per_page) . $anker . '" role="button">' . $i . '</a></li>';
|
||||
if ($i < $total_pages)
|
||||
{
|
||||
$page_string .= $seperator;
|
||||
}
|
||||
}
|
||||
}
|
||||
$page_string .= ($on_page == $total_pages) ? '<li class="active"><span>' . $total_pages . '</span></li></ul>' : '<li><a href="' . $base_url . "{$url_delim}" . $pagination_type . '=' . (($total_pages - 1) * $per_page) . $anker . '" role="button">' . $total_pages . '</a></li></ul>';
|
||||
$page_string .= ($on_page == $total_pages) ? '<li class="active"><span>' . $total_pages . '</span></li></ul>' : '<li><a class="button" href="' . $base_url . "{$url_delim}" . $pagination_type . '=' . (($total_pages - 1) * $per_page) . $anker . '" role="button">' . $total_pages . '</a></li></ul>';
|
||||
|
||||
if ($add_prevnext_text)
|
||||
{
|
||||
if ($on_page != 1)
|
||||
{
|
||||
$page_string = '<a href="' . $base_url . "{$url_delim}" . $pagination_type . '=' . (($on_page - 2) * $per_page) . $anker . '" role="button">' . $user->lang['PREVIOUS'] . '</a> ' . $page_string;
|
||||
$page_string = '<a class="button" href="' . $base_url . "{$url_delim}" . $pagination_type . '=' . (($on_page - 2) * $per_page) . $anker . '" role="button">' . $user->lang['PREVIOUS'] . '</a> ' . $page_string;
|
||||
}
|
||||
|
||||
if ($on_page != $total_pages)
|
||||
{
|
||||
$page_string .= ' <a href="' . $base_url . "{$url_delim}" . $pagination_type . '=' . ($on_page * $per_page) . $anker . '" role="button">' . $user->lang['NEXT'] . '</a>';
|
||||
$page_string .= ' <a class="button" href="' . $base_url . "{$url_delim}" . $pagination_type . '=' . ($on_page * $per_page) . $anker . '" role="button">' . $user->lang['NEXT'] . '</a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,5 +38,5 @@ $lang = array_merge($lang, array(
|
||||
'PORTAL_SEARCH_POSTS' => 'Beiträge',
|
||||
'PORTAL_SEARCH_AUTHOR' => 'Autor',
|
||||
'PORTAL_SEARCH_ENGINE' => 'Suchmaschinen',
|
||||
'PORTAL_SEARCH_ADV' => 'erweiterte Suche',
|
||||
'PORTAL_SEARCH_ADV' => 'Erweiterte Suche',
|
||||
));
|
||||
|
||||
@@ -188,8 +188,8 @@ class calendar extends module_base
|
||||
// output our general calendar bits
|
||||
$down = $this->mini_cal_month - 1;
|
||||
$up = $this->mini_cal_month + 1;
|
||||
$prev_month = '<a href="' . $this->modules_helper->route('board3_portal_controller') . "?m$module_id=$down#minical$module_id" . '" rel="nofollow"><span class="portal-arrow-left-icon" title="' . $this->user->lang['VIEW_PREVIOUS_MONTH'] . '"></span></a>';
|
||||
$next_month = '<a href="' . $this->modules_helper->route('board3_portal_controller') . "?m$module_id=$up#minical$module_id" . '" rel="nofollow"><span class="portal-arrow-right-icon" title="' . $this->user->lang['VIEW_NEXT_MONTH'] . '"></span></a>';
|
||||
$prev_month = '<a href="' . $this->modules_helper->route('board3_portal_controller') . "?m$module_id=$down#minical$module_id" . '" rel="nofollow"><i class="fa fa-backward" aria-hidden="true" title="' . $this->user->lang['VIEW_PREVIOUS_MONTH'] . '"></i></a>';
|
||||
$next_month = '<a href="' . $this->modules_helper->route('board3_portal_controller') . "?m$module_id=$up#minical$module_id" . '" rel="nofollow"><i class="fa fa-forward" aria-hidden="true" title="' . $this->user->lang['VIEW_NEXT_MONTH'] . '"></i></a>';
|
||||
|
||||
$this->template->assign_block_vars('minical', array(
|
||||
'S_SUNDAY_FIRST' => ($this->config['board3_sunday_first_' . $module_id]) ? true : false,
|
||||
|
||||
@@ -307,7 +307,7 @@ class custom extends module_base
|
||||
default:
|
||||
if (!isset($custom_code))
|
||||
{
|
||||
$custom_code = generate_text_for_edit($portal_config['board3_custom_' . $module_id . '_code'], $this->config['board3_custom_' . $module_id . '_uid'], '');
|
||||
$custom_code = generate_text_for_edit($portal_config['board3_custom_' . $module_id . '_code'], $this->config['board3_custom_' . $module_id . '_uid'], 0);
|
||||
}
|
||||
|
||||
$this->template->assign_vars(array(
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
convertWarningsToExceptions="true"
|
||||
processIsolation="false"
|
||||
stopOnFailure="false"
|
||||
syntaxCheck="false"
|
||||
verbose="true"
|
||||
bootstrap="../../../../tests/bootstrap.php">
|
||||
<testsuites>
|
||||
@@ -17,7 +16,7 @@
|
||||
<exclude>./tests/functional</exclude>
|
||||
</testsuite>
|
||||
<testsuite name="Extension Functional Tests">
|
||||
<directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">./tests/functional/</directory>
|
||||
<directory suffix="_test.php">./tests/functional/</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<filter>
|
||||
|
||||
@@ -1 +1 @@
|
||||
<!-- IF U_PORTAL --><span class="crumb"><a href="{U_PORTAL}" data-navbar-reference="portal">{L_PORTAL}</a></span><!-- ENDIF -->
|
||||
<!-- IF U_PORTAL --><span class="crumb"><a href="{U_PORTAL}" data-navbar-reference="portal"><i class="icon fa-university fa-fw" aria-hidden="true"></i><span>{L_PORTAL}</span></a></span><!-- ENDIF -->
|
||||
|
||||
@@ -1 +1 @@
|
||||
<!-- IF U_PORTAL --><span class="crumb"><a href="{U_PORTAL}" data-navbar-reference="portal">{L_PORTAL}</a></span><!-- ENDIF -->
|
||||
<!-- IF U_PORTAL --><span class="crumb"><a href="{U_PORTAL}" data-navbar-reference="portal"><i class="icon fa-university fa-fw" aria-hidden="true"></i><span>{L_PORTAL}</span></a></span><!-- ENDIF -->
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</h4>
|
||||
<!-- IF announcements.center_row.PAGINATION --><strong class="pagination"><span>{announcements.center_row.PAGINATION}</span></strong><!-- ENDIF -->
|
||||
<ul class="linklist">
|
||||
<li>{L_POSTED} {L_POST_BY_AUTHOR}{L_COLON} {announcements.center_row.POSTER_FULL} » {announcements.center_row.TIME}</li>
|
||||
<li>{L_POSTED} {L_POST_BY_AUTHOR}{L_COLON} {announcements.center_row.POSTER_FULL} » <a href="{announcements.center_row.U_LAST_COMMENTS}" title="{L_GOTO_LAST_POST}"> {announcements.center_row.TIME}</a></li>
|
||||
<li class="rightside"><!-- IF announcements.center_row.FORUM_NAME -->{L_FORUM}{L_COLON} <strong><a href="{announcements.center_row.U_VIEWFORUM}">{announcements.center_row.FORUM_NAME}</a></strong><!-- ELSE -->{L_GLOBAL_ANNOUNCEMENT}<!-- ENDIF --></li>
|
||||
</ul>
|
||||
<!-- IF not $S_POSTBODY_TOP --><div class="postbody portal-module-postbody"><!-- ENDIF -->
|
||||
|
||||
@@ -42,9 +42,13 @@
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF not S_IS_BOT -->
|
||||
<div class="responsive-show" style="display: none;">
|
||||
{L_LAST_POST} {L_POST_BY_AUTHOR} {announcements.center_row.USERNAME_FULL_LAST} » <a href="{announcements.center_row.U_LAST_COMMENTS}" title="{L_GOTO_LAST_POST}" title="{L_VIEW_LATEST_POST}"> {announcements.center_row.LAST_POST_TIME}</a>
|
||||
{L_LAST_POST} {L_POST_BY_AUTHOR} {announcements.center_row.USERNAME_FULL_LAST} » <a href="{announcements.center_row.U_LAST_COMMENTS}" title="{L_GOTO_LAST_POST}"> {announcements.center_row.LAST_POST_TIME}</a>
|
||||
</div>
|
||||
<!-- ELSE -->
|
||||
<br />
|
||||
<!-- ENDIF -->
|
||||
|
||||
<div class="responsive-hide">
|
||||
<!-- IF announcements.center_row.ATTACH_ICON_IMG --><i class="icon fa-paperclip fa-fw" aria-hidden="true"></i><!-- ENDIF -->
|
||||
@@ -64,8 +68,8 @@
|
||||
<dd class="posts">{announcements.center_row.REPLIES} <dfn>{L_REPLIES}</dfn></dd>
|
||||
<dd class="views">{announcements.center_row.TOPIC_VIEWS} <dfn>{L_VIEWS}</dfn></dd>
|
||||
<!-- ENDIF -->
|
||||
<dd class="lastpost"><span><dfn>{L_LAST_POST}</dfn>{L_POST_BY_AUTHOR} {announcements.center_row.USERNAME_FULL_LAST} <!-- IF announcements.center_row.S_UNREAD_INFO --><a href="{announcements.center_row.U_VIEW_UNREAD}" title="{L_VIEW_NEWEST_POST}"><i class="icon fa-external-link-square fa-fw icon-red icon-md" aria-hidden="true"></i><span class="sr-only">{L_VIEW_LATEST_POST}</span></a><!-- ELSE --><a href="{announcements.center_row.U_LAST_COMMENTS}" title="{L_VIEW_LATEST_POST}"><i class="icon fa-external-link-square fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">{L_VIEW_LATEST_POST}</span></a><!-- ENDIF --><br />
|
||||
{announcements.center_row.LAST_POST_TIME}</span>
|
||||
<dd class="lastpost"><span><dfn>{L_LAST_POST}</dfn>{L_POST_BY_AUTHOR} {announcements.center_row.USERNAME_FULL_LAST} <!-- IF not S_IS_BOT --><!-- IF announcements.center_row.S_UNREAD_INFO --><a href="{announcements.center_row.U_VIEW_UNREAD}" title="{L_VIEW_NEWEST_POST}"><i class="icon fa-external-link-square fa-fw icon-red icon-md" aria-hidden="true"></i><span class="sr-only">{L_VIEW_LATEST_POST}</span></a><!-- ELSE --><a href="{announcements.center_row.U_LAST_COMMENTS}" title="{L_VIEW_LATEST_POST}"><i class="icon fa-external-link-square fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">{L_VIEW_LATEST_POST}</span></a><!-- ENDIF --><br />
|
||||
{announcements.center_row.LAST_POST_TIME}</span><!-- ENDIF -->
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
@@ -74,6 +78,7 @@
|
||||
<li class="row<!-- IF announcements.center_row.S_ROW_COUNT is even --> bg2<!-- ELSE --> bg1<!-- ENDIF --> portal-news-pagination">
|
||||
<div class="topic-actions">
|
||||
<div class="pagination">
|
||||
<span><i class="icon fa-clone fa-fw" aria-hidden="true"></i></span>
|
||||
{announcements.TOTAL_ANNOUNCEMENTS}
|
||||
<!-- IF announcements.AP_PAGE_NUMBER --><!-- IF announcements.AP_PAGINATION --> • {announcements.AP_PAGE_NUMBER} • {announcements.AP_PAGINATION}<!-- ELSE --> • {announcements.AP_PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{$LR_BLOCK_H_L}<!-- IF $S_BLOCK_ICON --><img src="{$IMAGE_SRC}" width="{$IMAGE_WIDTH}" height="{$IMAGE_HEIGHT}" alt="" /> <!-- ENDIF -->{$TITLE}{$LR_BLOCK_H_R}
|
||||
<strong style="color:green<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->; float: right;<!-- ENDIF -->">{L_FRIENDS_ONLINE}</strong><br />
|
||||
<!-- BEGIN b3p_friends_online -->
|
||||
<span class="portal-user-icon"></span><span class="portal-user-span">{b3p_friends_online.USERNAME_FULL}</span><br class="portal-clear" />
|
||||
<span class="portal-user-icon"></span><span class="portal-user-span"><i class="icon fa-user fa-fw" aria-hidden="true"></i><span>{b3p_friends_online.USERNAME_FULL}</span</span><br class="portal-clear" />
|
||||
<!-- BEGINELSE -->
|
||||
<span class="portal-user-span">{L_NO_FRIENDS_ONLINE}</span>
|
||||
<br class="portal-clear" />
|
||||
@@ -9,7 +9,7 @@
|
||||
<br class="portal-clear" />
|
||||
<strong style="color:red<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->; float: right;<!-- ENDIF -->">{L_FRIENDS_OFFLINE}</strong><br />
|
||||
<!-- BEGIN b3p_friends_offline -->
|
||||
<span class="portal-user-icon"></span><span class="portal-user-span"><i class="icon fa-user fa-fw" aria-hidden="true"></i>{b3p_friends_offline.USERNAME_FULL}</span><br class="portal-clear" />
|
||||
<span class="portal-user-icon"></span><span class="portal-user-span"><i class="icon fa-user fa-fw" aria-hidden="true"></i><span>{b3p_friends_offline.USERNAME_FULL}</span></span><br class="portal-clear" />
|
||||
<!-- BEGINELSE -->
|
||||
<span class="portal-user-span">{L_NO_FRIENDS_OFFLINE}</span>
|
||||
<!-- END b3p_friends_offline -->
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
<br />
|
||||
<input type="hidden" name="redirect" value="{U_PORTAL_REDIRECT}" />
|
||||
<input type="submit" name="login" tabindex="5" value="{L_LOGIN}" class="button1" />
|
||||
{S_LOGIN_REDIRECT}
|
||||
{S_FORM_TOKEN_LOGIN}
|
||||
{$LR_BLOCK_F_L}{$LR_BLOCK_F_R}
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
<!-- BEGIN news -->
|
||||
<!-- IF news.MODULE_ID eq $MODULE_ID -->
|
||||
<!-- BEGIN news_row -->
|
||||
<!-- IF news.news_row.S_FIRST_ROW --><a id="n_{$MODULE_ID}"></a><!-- ENDIF -->
|
||||
<!-- IF news.news_row.S_NO_TOPICS -->
|
||||
<div class="post bg2">
|
||||
<div class="inner">
|
||||
@@ -13,10 +12,15 @@
|
||||
<!-- ELSE -->
|
||||
<div class="post <!-- IF news.news_row.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
|
||||
<div class="inner">
|
||||
<h4 class="first"><a id="n_{$MODULE_ID}_{news.news_row.N_ID}"></a><!-- IF news.news_row.S_UNREAD_INFO --><a href="{news.news_row.U_VIEW_UNREAD}">{NEWEST_POST_IMG}</a><!-- ELSE --><a href="{news.news_row.U_LAST_COMMENTS}">{READ_POST_IMG}</a><!-- ENDIF --> {news.news_row.ATTACH_ICON_IMG} <!-- IF news.news_row.S_POLL --><strong>{L_VIEW_TOPIC_POLL}</strong><!-- ENDIF --><!-- IF news.news_row.TOPIC_ICON_IMG --><img src="{T_ICONS_PATH}{news.news_row.TOPIC_ICON_IMG}" width="{news.news_row.TOPIC_ICON_IMG_WIDTH}" height="{news.news_row.TOPIC_ICON_IMG_HEIGHT}" alt="" /> <!-- ENDIF --><a href="{news.news_row.U_VIEW_COMMENTS}"><strong>{news.news_row.TITLE}</strong></a></h4>
|
||||
<h4 class="first">
|
||||
<a id="n_{$MODULE_ID}_{news.news_row.N_ID}"></a><!-- IF news.news_row.S_UNREAD_INFO --><a href="{news.news_row.U_VIEW_UNREAD}" title="{postrow.MINI_POST}"><!-- ELSE --><a href="{news.news_row.U_LAST_COMMENTS}"><!-- ENDIF -->
|
||||
<i class="icon fa-file fa-fw <!-- IF news.news_row.S_UNREAD_INFO -->icon-red<!-- ELSE -->icon-lightgray<!-- ENDIF --> icon-md" aria-hidden="true"></i><span class="sr-only">{postrow.MINI_POST}</span>
|
||||
</a>
|
||||
<!-- IF news.news_row.S_UNREAD_INFO --><a class="unread" href="{news.news_row.U_VIEW_UNREAD}" title="{postrow.MINI_POST}"></a><!-- ELSE --><a href="{news.news_row.U_LAST_COMMENTS}"></a><!-- ENDIF --><!-- IF news.news_row.TOPIC_ICON_IMG --><img src="{T_ICONS_PATH}{news.news_row.POST_ICON_IMG}" width="{news.news_row.POST_ICON_IMG_WIDTH}" height="{news.news_row.POST_ICON_IMG_HEIGHT}" alt="" /> <!-- ENDIF --><a href="{news.news_row.U_VIEW_COMMENTS}"><strong>{news.news_row.TITLE}</strong></a>
|
||||
</h4>
|
||||
<!-- IF news.news_row.PAGINATION --><strong class="pagination"><span>{news.news_row.PAGINATION}</span></strong><!-- ENDIF -->
|
||||
<ul class="linklist">
|
||||
<li>{news.POSTED_BY_TEXT} {L_POST_BY_AUTHOR}{L_COLON} {news.news_row.POSTER_FULL} » {news.news_row.TIME}</li>
|
||||
<li>{news.POSTED_BY_TEXT} {L_POST_BY_AUTHOR}{L_COLON} {news.news_row.POSTER_FULL} » <a href="{news.news_row.U_LAST_COMMENTS}" title="{L_GOTO_LAST_POST}"> {news.news_row.TIME}</a></li>
|
||||
<li class="rightside">{L_FORUM}{L_COLON} <strong><a href="{news.news_row.U_VIEWFORUM}">{news.news_row.FORUM_NAME}</a></strong></li>
|
||||
</ul>
|
||||
<!-- IF not $S_POSTBODY_TOP --><div class="postbody portal-module-postbody"><!-- ENDIF -->
|
||||
@@ -34,7 +38,12 @@
|
||||
<br class="portal-clear" />
|
||||
<span class="portal-title-span">{L_TOPIC_VIEWS}{L_COLON} {news.news_row.TOPIC_VIEWS} • <a href="{news.news_row.U_VIEW_COMMENTS}" title="{L_VIEW_COMMENTS}">{L_COMMENTS}{L_COLON} {news.news_row.REPLIES}</a> • <a href="{news.news_row.U_POST_COMMENT}">{L_PORTAL_POST_REPLY}</a></span>
|
||||
<span class="portal-read-all-link">{news.news_row.OPEN}<a href="{news.news_row.U_READ_FULL}">{news.news_row.L_READ_FULL}</a>{news.news_row.CLOSE}</span>
|
||||
<div class="back2top"><a href="#wrap" class="top" title="{L_BACK_TO_TOP}">{L_BACK_TO_TOP}</a></div>
|
||||
<div class="back2top">
|
||||
<a href="#top" class="top" title="{L_BACK_TO_TOP}">
|
||||
<i class="icon fa-chevron-circle-up fa-fw icon-gray" aria-hidden="true"></i>
|
||||
<span class="sr-only">{L_BACK_TO_TOP}</span>
|
||||
</a>
|
||||
</div>
|
||||
<!-- IF news.news_row.S_NOT_LAST --><br class="portal-clear" /><!-- ENDIF -->
|
||||
<!-- IF news.news_row.S_LAST_ROW -->
|
||||
<!-- IF not news.news_row.S_NO_TOPICS -->
|
||||
|
||||
@@ -42,14 +42,18 @@
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF not S_IS_BOT -->
|
||||
<div class="responsive-show" style="display: none;">
|
||||
{L_LAST_POST} {L_POST_BY_AUTHOR} {news.news_row.USERNAME_FULL_LAST} » <a href="{news.news_row.U_LAST_COMMENTS}" title="{L_GOTO_LAST_POST}" title="{L_VIEW_LATEST_POST}"> {news.news_row.LAST_POST_TIME}</a>
|
||||
{L_LAST_POST} {L_POST_BY_AUTHOR} {news.news_row.USERNAME_FULL_LAST} » <a href="{news.news_row.U_LAST_COMMENTS}" title="{L_GOTO_LAST_POST}"> {news.news_row.LAST_POST_TIME}</a>
|
||||
</div>
|
||||
<!-- ELSE -->
|
||||
<br />
|
||||
<!-- ENDIF -->
|
||||
|
||||
<div class="responsive-hide">
|
||||
<!-- IF news.news_row.ATTACH_ICON_IMG --><i class="icon fa-paperclip fa-fw" aria-hidden="true"></i><!-- ENDIF -->
|
||||
<!-- IF news.news_row.S_POLL --> <i class="icon fa-bar-chart fa-fw" aria-hidden="true"></i> <!-- ENDIF -->
|
||||
{L_POST_BY_AUTHOR} {news.news_row.POSTER_FULL} » {news.news_row.TIME}
|
||||
<!-- IF news.news_row.S_POLL --><i class="icon fa-bar-chart fa-fw" aria-hidden="true"></i> <!-- ENDIF -->
|
||||
{L_POSTED} {L_POST_BY_AUTHOR} {news.news_row.POSTER_FULL} » {news.news_row.TIME}
|
||||
</div>
|
||||
<!-- IF news.news_row.FORUM_NAME -->
|
||||
{L_FORUM}{L_COLON} <a href="{news.news_row.U_VIEWFORUM}" class="portal-forumtitle">{news.news_row.FORUM_NAME}</a>
|
||||
@@ -61,8 +65,8 @@
|
||||
<dd class="posts" data-skip-responsive="true">{news.news_row.REPLIES} <dfn>{L_REPLIES}</dfn></dd>
|
||||
<dd class="views" data-skip-responsive="true">{news.news_row.TOPIC_VIEWS} <dfn>{L_VIEWS}</dfn></dd>
|
||||
<!-- ENDIF -->
|
||||
<dd class="lastpost"><span><dfn>{L_LAST_POST}</dfn>{L_POST_BY_AUTHOR} {news.news_row.USERNAME_FULL_LAST} <!-- IF news.news_row.S_UNREAD_INFO --><a href="{news.news_row.U_VIEW_UNREAD}" title="{L_VIEW_NEWEST_POST}"><i class="icon fa-external-link-square fa-fw icon-red icon-md" aria-hidden="true"></i><span class="sr-only">{L_VIEW_LATEST_POST}</span></a><!-- ELSE --><a href="{news.news_row.U_LAST_COMMENTS}" title="{L_VIEW_LATEST_POST}"><i class="icon fa-external-link-square fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">{L_VIEW_LATEST_POST}</span></a><!-- ENDIF --><br />
|
||||
{news.news_row.LAST_POST_TIME}</span>
|
||||
<dd class="lastpost"><span><dfn>{L_LAST_POST}</dfn>{L_POST_BY_AUTHOR} {news.news_row.USERNAME_FULL_LAST} <!-- IF not S_IS_BOT --><!-- IF news.news_row.S_UNREAD_INFO --><a href="{news.news_row.U_VIEW_UNREAD}" title="{L_VIEW_NEWEST_POST}"><i class="icon fa-external-link-square fa-fw icon-red icon-md" aria-hidden="true"></i><span class="sr-only">{L_VIEW_LATEST_POST}</span></a><!-- ELSE --><a href="{news.news_row.U_LAST_COMMENTS}" title="{L_VIEW_LATEST_POST}"><i class="icon fa-external-link-square fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">{L_VIEW_LATEST_POST}</span></a><!-- ENDIF --><br />
|
||||
{news.news_row.LAST_POST_TIME}</span><!-- ENDIF -->
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{$LR_BLOCK_H_L}<!-- IF $S_BLOCK_ICON --><img src="{$IMAGE_SRC}" width="{$IMAGE_WIDTH}" height="{$IMAGE_HEIGHT}" alt="" /> <!-- ENDIF -->{$TITLE}{$LR_BLOCK_H_R}
|
||||
<!-- BEGIN random_member -->
|
||||
<div class="portal-centered-content"><span class="portal-random-member-name">{random_member.USERNAME_FULL}</span><br class="portal-clear" />
|
||||
<!-- IF random_member.AVATAR_IMG --><a href="{random_member.U_VIEW_PROFILE}">{random_member.AVATAR_IMG}</a><br class="portal-clear" /><!-- ENDIF -->
|
||||
<!-- IF random_member.AVATAR_IMG --><a href="{random_member.U_VIEW_PROFILE}">{random_member.AVATAR_IMG}</a><!-- ELSEIF $NO_AVATAR_IMG --><a href="{random_member.U_VIEW_PROFILE}"><img src="{T_THEME_PATH}{$NO_AVATAR_IMG}" alt="" /></a><br class="portal-clear" /><!-- ENDIF -->
|
||||
<!-- IF random_member.RANK_TITLE --><span class="gensmall">{random_member.RANK_TITLE}</span><br class="portal-clear" /><!-- ENDIF -->
|
||||
<!-- IF random_member.RANK_IMG -->{random_member.RANK_IMG}<br class="portal-clear" /><!-- ENDIF -->
|
||||
</div>
|
||||
|
||||
@@ -49,7 +49,7 @@ function qsearch_onSubmit()
|
||||
{$LR_BLOCK_H_L}<!-- IF $S_BLOCK_ICON --><img src="{$IMAGE_SRC}" width="{$IMAGE_WIDTH}" height="{$IMAGE_HEIGHT}" alt="" /> <!-- ENDIF -->{$TITLE}{$LR_BLOCK_H_R}
|
||||
<form id="qsearch_form" method="post" action="{U_SEARCH}" onsubmit="return qsearch_onSubmit();">
|
||||
<p>
|
||||
<input type="text" tabindex="6" name="keywords" id="searchfield" maxlength="40" title="{L_SEARCH_KEYWORDS}" class="inputbox search autowidth" value="<!-- IF SEARCH_WORDS-->{SEARCH_WORDS}<!-- ELSE -->{L_SEARCH_MINI}<!-- ENDIF -->" onclick="if(this.value=='{LA_SEARCH_MINI}')this.value='';" onblur="if(this.value=='')this.value='{LA_SEARCH_MINI}';" />
|
||||
<input type="text" tabindex="6" name="keywords" id="searchfield" maxlength="40" title="{L_SEARCH_KEYWORDS}" class="inputbox search icon_portal_search" value="<!-- IF SEARCH_WORDS-->{SEARCH_WORDS}<!-- ELSE -->{L_SEARCH_MINI}<!-- ENDIF -->" onclick="if(this.value=='{LA_SEARCH_MINI}')this.value='';" onblur="if(this.value=='')this.value='{LA_SEARCH_MINI}';" />
|
||||
</p>
|
||||
<p>
|
||||
<select id="qsearch_select" tabindex="7">
|
||||
@@ -73,4 +73,4 @@ function qsearch_onSubmit()
|
||||
</p>
|
||||
</form>
|
||||
<p><a href="{U_SEARCH}">{L_PORTAL_SEARCH_ADV}</a></p>
|
||||
{$LR_BLOCK_F_L}{$LR_BLOCK_F_R}
|
||||
{$LR_BLOCK_F_L}{$LR_BLOCK_F_R}
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
{$C_BLOCK_H_L}<!-- IF U_VIEWONLINE --><a href="{U_VIEWONLINE}">{$TITLE}</a><!-- ELSE -->{$TITLE}<!-- ENDIF -->{$C_BLOCK_H_R}
|
||||
<ul class="topiclist bg1">
|
||||
<li><dl><dt></dt>
|
||||
<li>
|
||||
<dl>
|
||||
<dt></dt>
|
||||
<dd class="portal-whois-online-content portal-responsive-show">
|
||||
<p>{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{RECORD_USERS}<br /> <br />{LOGGED_IN_USER_LIST}
|
||||
<!-- IF PORTAL_LEGEND --><br /><em>{L_LEGEND}{L_COLON} {PORTAL_LEGEND}</em><!-- ENDIF --></p>
|
||||
<p>{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{RECORD_USERS}<br />
|
||||
<!-- IF U_VIEWONLINE -->
|
||||
<br />{LOGGED_IN_USER_LIST}
|
||||
<!-- IF PORTAL_LEGEND --><br /><em>{L_LEGEND}{L_COLON} {PORTAL_LEGEND}</em><!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
</p>
|
||||
</dd>
|
||||
</dl></li>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
{$C_BLOCK_F_L}{$C_BLOCK_F_R}
|
||||
{$C_BLOCK_F_L}{$C_BLOCK_F_R}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
{$LR_BLOCK_H_L}<!-- IF $S_BLOCK_ICON --><img src="{$IMAGE_SRC}" width="{$IMAGE_WIDTH}" height="{$IMAGE_HEIGHT}" alt="" /> <!-- ENDIF --><!-- IF U_VIEWONLINE --><a href="{U_VIEWONLINE}">{$TITLE}</a><!-- ELSE -->{$TITLE}<!-- ENDIF -->{$LR_BLOCK_H_R}
|
||||
<div class="portal-whois-online-content">
|
||||
<p>{TOTAL_USERS_ONLINE}<br /> <br />{LOGGED_IN_USER_LIST}</p>
|
||||
<p>{TOTAL_USERS_ONLINE}<br />
|
||||
<!-- IF U_VIEWONLINE -->
|
||||
<br />{LOGGED_IN_USER_LIST}
|
||||
<!-- ENDIF -->
|
||||
</p>
|
||||
</div>
|
||||
{$LR_BLOCK_F_L}{$LR_BLOCK_F_R}
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
</div>
|
||||
|
||||
<!--// board3 Portal by www.board3.de //-->
|
||||
<div class="copyright">Powered by <a href="http://www.board3.de/">Board3 Portal</a> © 2009 - 2015 Board3 Group</div>
|
||||
<div class="copyright b3p-copyright">Powered by <a href="http://www.board3.de/">Board3 Portal</a> © 2009 - 2021 Board3 Group</div>
|
||||
|
||||
<!-- INCLUDEJS portal/assets/jquery.getscrollbarwidth.js -->
|
||||
<!-- INCLUDEJS portal/assets/portal.js -->
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 102 B |
Binary file not shown.
|
Before Width: | Height: | Size: 103 B |
BIN
styles/prosilver/theme/images/portal/icon_portal_search.png
Normal file
BIN
styles/prosilver/theme/images/portal/icon_portal_search.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 813 B |
Binary file not shown.
|
Before Width: | Height: | Size: 144 B |
BIN
styles/prosilver/theme/images/portal/portal_weather.png
Normal file
BIN
styles/prosilver/theme/images/portal/portal_weather.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
@@ -1,5 +1,17 @@
|
||||
/* main menu, user menu and the links */
|
||||
|
||||
.content li {
|
||||
list-style-type: inherit !important;
|
||||
}
|
||||
|
||||
a {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style-type: disc !important;
|
||||
}
|
||||
|
||||
.portal-navigation{
|
||||
width: auto;
|
||||
}
|
||||
@@ -122,10 +134,6 @@
|
||||
min-height: 1em;
|
||||
}
|
||||
|
||||
.content li {
|
||||
list-style-type: inherit !important;
|
||||
}
|
||||
|
||||
.portal-stylechanger-select {
|
||||
width: 150px;
|
||||
}
|
||||
@@ -205,7 +213,8 @@ a.portal-forumtitle {
|
||||
}
|
||||
|
||||
.portal-poll-side-option-info {
|
||||
width: 30% !important;
|
||||
width: 58% !important;
|
||||
float: right !important;
|
||||
}
|
||||
|
||||
.portal-poll-side-checkbox {
|
||||
@@ -214,6 +223,7 @@ a.portal-forumtitle {
|
||||
|
||||
.portal-poll-side-checkbox input {
|
||||
vertical-align: top;
|
||||
margin-left: 39px;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
@@ -234,6 +244,7 @@ a.portal-forumtitle {
|
||||
|
||||
.portal-calendar-days-title td, .portal-calendar-days td {
|
||||
width: 14%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.portal-calendar-days-title span {
|
||||
@@ -617,4 +628,11 @@ dd.responsive-portal-news:last-of-type, dd.responsive-portal-announcements:last-
|
||||
.fa-backward, .fa-forward {
|
||||
font-size: 1.4em;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.icon_portal_search {
|
||||
background-image: url("../../prosilver/theme/images/portal/icon_portal_search.png") !important;
|
||||
background-position: left 1px;
|
||||
background-repeat: no-repeat;
|
||||
padding-left: 17px;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
@media only screen and (max-width: 1040px), only screen and (max-device-width: 1040px)
|
||||
{
|
||||
@media (max-width: 1040px) {
|
||||
.responsive-portal-announcements dd.views { display: none !important; }
|
||||
dd.responsive-portal-announcements { display: none !important; }
|
||||
|
||||
@@ -21,8 +20,7 @@
|
||||
#portal-forumlist dl.icon dt { width: 125% !important; }
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 895px), only screen and (max-device-width: 895px)
|
||||
{
|
||||
@media (max-width: 895px) {
|
||||
div#portal-right {
|
||||
width: 49% !important;
|
||||
margin-left: 1% !important;
|
||||
@@ -53,8 +51,7 @@
|
||||
.responsive-portal-announcements dt { width: 100% !important; }
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 700px), only screen and (max-device-width: 700px)
|
||||
{
|
||||
@media (max-width: 700px) {
|
||||
.responsive-portal-news dd.lastpost, .responsive-portal-announcements dd.lastpost { display: none !important; }
|
||||
.responsive-portal-news dt .list-inner, .responsive-portal-announcements dt .list-inner { margin-right: 0 !important; }
|
||||
.responsive-portal-news dt, .responsive-portal-announcements dt { width: 100% !important; }
|
||||
@@ -70,6 +67,11 @@
|
||||
float: right !important;
|
||||
}
|
||||
|
||||
.row .pagination .ellipsis + li {
|
||||
display: inline !important;
|
||||
vertical-align: bottom !important;
|
||||
}
|
||||
|
||||
#portal-forumlist dl.icon dt { width: 100% !important; }
|
||||
#portal-left ul.topiclist dd, #portal-right ul.topiclist dd { display: block !important; }
|
||||
.portal-responsive-show { display: block !important; }
|
||||
@@ -84,4 +86,17 @@
|
||||
margin-right: 0 !important;
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
|
||||
.b3p-jumpbox {
|
||||
margin: 15px auto;
|
||||
}
|
||||
.b3p-copyright {
|
||||
clear: both;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 500px) {
|
||||
.portal-news-pagination .pagination {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
class phpbb_functional_portal_acp_test extends \board3\portal\tests\testframework\functional_test_case
|
||||
{
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
class phpbb_functional_portal_announcement_test extends \board3\portal\tests\testframework\functional_test_case
|
||||
{
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
$this->purge_cache();
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
class phpbb_functional_portal_birthday_list_test extends \board3\portal\tests\testframework\functional_test_case
|
||||
{
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
class phpbb_functional_portal_link_test extends \board3\portal\tests\testframework\functional_test_case
|
||||
{
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
class phpbb_functional_portal_no_error_test extends \board3\portal\tests\testframework\functional_test_case
|
||||
{
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
class phpbb_functional_portal_redirect_test extends \board3\portal\tests\testframework\functional_test_case
|
||||
{
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
class phpbb_functional_portal_visit_registered_test extends \board3\portal\tests\testframework\functional_test_case
|
||||
{
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
class phpbb_functional_portal_vote_poll_test extends \board3\portal\tests\testframework\functional_test_case
|
||||
{
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
namespace board3\portal\tests\mock;
|
||||
|
||||
class user extends \PHPUnit_Framework_TestCase
|
||||
class user extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
public $lang = array();
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ abstract class database_test_case extends \phpbb_database_test_case
|
||||
|
||||
protected $db;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
global $db;
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package Board3 Portal Testing
|
||||
* @copyright (c) Board3 Group ( www.board3.de )
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace board3\portal\tests\testframework;
|
||||
|
||||
abstract class ui_test_case extends \phpbb_ui_test_case
|
||||
{
|
||||
static protected function setup_extensions()
|
||||
{
|
||||
return array('board3/portal');
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package testing
|
||||
* @copyright (c) 2013 Board3 Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @group ui
|
||||
*/
|
||||
class phpbb_ui_portal_visit_ui_test extends \board3\portal\tests\testframework\ui_test_case
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
$this->purge_cache();
|
||||
|
||||
$this->login();
|
||||
$this->admin_login();
|
||||
}
|
||||
|
||||
public function test_vanilla_board()
|
||||
{
|
||||
$this->visit('app.php/portal');
|
||||
}
|
||||
}
|
||||
@@ -37,7 +37,7 @@ class phpbb_acp_move_module_test extends \board3\portal\tests\testframework\data
|
||||
/** @var \phpbb_mock_request */
|
||||
protected $request;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
global $db, $cache, $phpbb_root_path, $phpEx, $user, $phpbb_container, $request, $template, $table_prefix;
|
||||
@@ -51,10 +51,12 @@ class phpbb_acp_move_module_test extends \board3\portal\tests\testframework\data
|
||||
$phpbb_container = new \phpbb_mock_container_builder();
|
||||
// Mock module service collection
|
||||
$config = new \phpbb\config\config(array());
|
||||
$auth = $this->getMock('\phpbb\auth\auth', array('acl_get'));
|
||||
$auth = $this->getMockBuilder('\phpbb\auth\auth')
|
||||
->setMethods(['acl_get'])
|
||||
->getMock();
|
||||
$auth->expects($this->any())
|
||||
->method('acl_get')
|
||||
->with($this->anything())
|
||||
->withAnyParameters()
|
||||
->will($this->returnValue(true));
|
||||
$controller_helper = new \board3\portal\tests\mock\controller_helper($phpbb_root_path, $phpEx);
|
||||
$controller_helper->add_route('board3_portal_controller', 'portal');
|
||||
@@ -73,7 +75,9 @@ class phpbb_acp_move_module_test extends \board3\portal\tests\testframework\data
|
||||
$phpbb_container->setParameter('board3.portal.config.table', $table_prefix . 'portal_config');
|
||||
$this->portal_columns = new \board3\portal\portal\columns();
|
||||
$phpbb_container->set('board3.portal.columns', $this->portal_columns);
|
||||
$cache = $this->getMock('\phpbb\cache\cache', array('destroy', 'sql_exists', 'get', 'put', 'sql_load', 'sql_save'));
|
||||
$cache = $this->getMockBuilder('\phpbb\cache\cache')
|
||||
->setMethods(['destroy', 'sql_exists', 'get', 'put', 'sql_load', 'sql_save'])
|
||||
->getMock();
|
||||
$cache->expects($this->any())
|
||||
->method('destroy')
|
||||
->with($this->equalTo('sql'));
|
||||
@@ -102,7 +106,9 @@ class phpbb_acp_move_module_test extends \board3\portal\tests\testframework\data
|
||||
));
|
||||
$this->database_handler = new \board3\portal\portal\modules\database_handler($db);
|
||||
$this->constraints_handler = new \board3\portal\portal\modules\constraints_handler($this->portal_columns, $user);
|
||||
$phpbb_dispatcher = $this->getMock('\phpbb\event\dispatcher', array('trigger_event'), array($phpbb_container));
|
||||
$phpbb_dispatcher = $this->getMockBuilder('\phpbb\event\dispatcher')
|
||||
->setMethods(['trigger_event'])
|
||||
->getMock();
|
||||
$phpbb_dispatcher->expects($this->any())
|
||||
->method('trigger_event')
|
||||
->with($this->anything())
|
||||
|
||||
@@ -19,14 +19,18 @@ class helper_test extends \board3\portal\tests\testframework\test_case
|
||||
|
||||
static public $redirect = false;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
global $cache, $phpbb_extension_manager, $phpbb_root_path;
|
||||
|
||||
parent::setUp();
|
||||
|
||||
$cache = $this->getMock('\phpbb\cache\driver', array('get', 'put'));
|
||||
$this->auth = $this->getMock('\phpbb\auth\auth', array('acl_get'));
|
||||
$cache = $this->getMockBuilder('\phpbb\cache\driver')
|
||||
->setMethods(['get', 'put'])
|
||||
->getMock();
|
||||
$this->auth = $this->getMockBuilder('\phpbb\auth\auth')
|
||||
->setMethods(['acl_get'])
|
||||
->getMock();
|
||||
$this->auth->expects($this->any())
|
||||
->method('acl_get')
|
||||
->with($this->anything())
|
||||
@@ -143,7 +147,10 @@ class helper_test extends \board3\portal\tests\testframework\test_case
|
||||
$this->assertNull($this->controller_helper->load_module_language($this->modules['\board3\portal\modules\link_us']));
|
||||
$this->assertEquals('Link to us', $this->user->lang('LINK_US'));
|
||||
$this->assertFalse(isset($this->user->lang['PORTAL_LEADERS_EXT']));
|
||||
$module = $this->getMock('\board3\portal\modules\link_us', array('get_language'), array($this->config, new \board3\portal\tests\mock\template($this), new \board3\portal\tests\mock\user));
|
||||
$module = $this->getMockBuilder('\board3\portal\modules\link_us')
|
||||
->setMethods(['get_language'])
|
||||
->setConstructorArgs([$this->config, new \board3\portal\tests\mock\template($this), new \board3\portal\tests\mock\user])
|
||||
->getMock();
|
||||
$module->expects($this->any())
|
||||
->method('get_language')
|
||||
->willReturn(array(
|
||||
|
||||
@@ -25,7 +25,7 @@ class main_test extends \board3\portal\tests\testframework\database_test_case
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/../acp/fixtures/modules.xml');
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
global $phpbb_root_path, $phpEx, $table_prefix, $cache;
|
||||
|
||||
@@ -54,7 +54,9 @@ class main_test extends \board3\portal\tests\testframework\database_test_case
|
||||
'\board3\portal\modules\clock' => new \board3\portal\modules\clock($this->config, $this->template),
|
||||
);
|
||||
$portal_helper = new \board3\portal\includes\helper($modules);
|
||||
$auth = $this->getMock('\phpbb\auth\auth', array('acl_get'));
|
||||
$auth = $this->getMockBuilder('\phpbb\auth\auth')
|
||||
->setMethods(['acl_get'])
|
||||
->getMock();
|
||||
$auth->expects($this->any())
|
||||
->method('acl_get')
|
||||
->with($this->anything())
|
||||
|
||||
@@ -22,7 +22,7 @@ class listener_test extends \phpbb_template_template_test_case
|
||||
|
||||
static public $hidden_fields = array();
|
||||
|
||||
public function setup()
|
||||
public function setup(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@@ -36,9 +36,11 @@ class listener_test extends \phpbb_template_template_test_case
|
||||
|
||||
public function setup_listener()
|
||||
{
|
||||
global $cache, $db, $phpbb_root_path, $phpEx;
|
||||
global $cache, $db, $phpbb_root_path, $phpEx, $phpbb_admin_path;
|
||||
|
||||
$cache = $this->getMock('\phpbb\cache\cache', array('obtain_word_list', 'get', 'sql_exists', 'put', 'obtain_attach_extensions'));
|
||||
$cache = $this->getMockBuilder('\phpbb\cache\driver\dummy')
|
||||
->setMethods(['obtain_word_list', 'get', 'sql_exists', 'put', 'obtain_attach_extensions'])
|
||||
->getMock();
|
||||
$cache->expects($this->any())
|
||||
->method('obtain_word_list')
|
||||
->with()
|
||||
@@ -47,14 +49,24 @@ class listener_test extends \phpbb_template_template_test_case
|
||||
->method('get')
|
||||
->with($this->anything())
|
||||
->will($this->returnValue(false));
|
||||
$db = $this->getMock('\phpbb\db\driver\driver_interface');
|
||||
$db = $this->getMockBuilder('\phpbb\db\driver\driver_interface')
|
||||
->getMock();
|
||||
$this->language_file_loader = new \phpbb\language\language_file_loader($phpbb_root_path, 'php');
|
||||
$this->language = new \phpbb\language\language($this->language_file_loader);
|
||||
|
||||
$this->user = $this->getMock('\phpbb\user', array(), array($this->language, '\phpbb\datetime'));
|
||||
$this->user = $this->getMockBuilder('\phpbb\user')
|
||||
->setConstructorArgs([$this->language, '\phpbb\datetime'])
|
||||
->getMock();
|
||||
$this->user->expects($this->any())
|
||||
->method('lang')
|
||||
->will($this->returnValue('foo'));
|
||||
$this->auth = $this->getMockBuilder('\phpbb\auth\auth')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
$this->auth->expects($this->any())
|
||||
->method('acl_get')
|
||||
->with($this->anything())
|
||||
->will($this->returnValue(true));
|
||||
|
||||
$manager = new \phpbb_mock_extension_manager(dirname(__FILE__) . '/', array());
|
||||
$finder = new \phpbb\finder(
|
||||
@@ -83,7 +95,26 @@ class listener_test extends \phpbb_template_template_test_case
|
||||
$routes = $router->get_routes();
|
||||
$symfony_request = new \phpbb\symfony_request($request);
|
||||
$routing_helper = new \phpbb\routing\helper($this->config, $router, $symfony_request, $request, $filesystem, $phpbb_root_path, 'php');
|
||||
$this->controller_helper = new mock_controller_helper($this->template, $this->user, $this->config, $symfony_request, $request, $routing_helper);
|
||||
$cron_manager = $this->getMockBuilder('\phpbb\cron\manager')->disableOriginalConstructor()->getMock();
|
||||
$dispatcher = $this->getMockBuilder('\phpbb\event\dispatcher')->getMock();
|
||||
$language = $this->getMockBuilder('\phpbb\language\language')->disableOriginalConstructor()->getMock();
|
||||
$this->controller_helper = new mock_controller_helper(
|
||||
$this->auth,
|
||||
$cache,
|
||||
$this->config,
|
||||
$cron_manager,
|
||||
$db,
|
||||
$dispatcher,
|
||||
$language,
|
||||
$request,
|
||||
$routing_helper,
|
||||
$symfony_request,
|
||||
$this->template,
|
||||
$this->user,
|
||||
$phpbb_root_path,
|
||||
$phpbb_admin_path,
|
||||
$phpEx
|
||||
);
|
||||
|
||||
$this->path_helper = new \phpbb\path_helper(
|
||||
new \phpbb\symfony_request(
|
||||
@@ -95,14 +126,6 @@ class listener_test extends \phpbb_template_template_test_case
|
||||
$this->php_ext
|
||||
);
|
||||
|
||||
$this->auth = $this->getMockBuilder('\phpbb\auth\auth')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
$this->auth->expects($this->any())
|
||||
->method('acl_get')
|
||||
->with($this->anything())
|
||||
->will($this->returnValue(true));
|
||||
|
||||
$this->controller = $this->getMockBuilder('\board3\portal\controller\main')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
@@ -12,7 +12,7 @@ require_once(dirname(__FILE__) . '/../../../../../../includes/functions.php');
|
||||
|
||||
class phpbb_functions_check_file_src_test extends \board3\portal\tests\testframework\database_test_case
|
||||
{
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
global $phpbb_root_path, $portal_root_path;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ class phpbb_functions_fetch_news_test extends \board3\portal\tests\testframework
|
||||
{
|
||||
protected $default_main_columns = array('topic_count', 'global_id', 'topic_icons');
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@@ -30,7 +30,9 @@ class phpbb_functions_fetch_news_test extends \board3\portal\tests\testframework
|
||||
$user->add_lang('../../ext/board3/portal/language/en/portal');
|
||||
$request = new \phpbb_mock_request;
|
||||
$phpbb_dispatcher = new phpbb_mock_event_dispatcher();
|
||||
$cache = $this->getMock('\phpbb\cache\cache', array('obtain_word_list', 'get', 'sql_exists', 'put', 'obtain_attach_extensions', 'sql_load', 'sql_save'));
|
||||
$cache = $this->getMockBuilder('\phpbb\cache\driver\dummy')
|
||||
->setMethods(['obtain_word_list', 'get', 'sql_exists', 'put', 'obtain_attach_extensions', 'sql_load', 'sql_save'])
|
||||
->getMock();
|
||||
$cache->expects($this->any())
|
||||
->method('obtain_word_list')
|
||||
->with()
|
||||
@@ -66,7 +68,9 @@ class phpbb_functions_fetch_news_test extends \board3\portal\tests\testframework
|
||||
$this->modules_helper = new \board3\portal\includes\modules_helper($auth, $this->config, $controller_helper, $request);
|
||||
$phpbb_container->set('board3.portal.modules_helper', $this->modules_helper);
|
||||
$phpbb_container->set('board3.portal.fetch_posts', new \board3\portal\portal\fetch_posts($auth, $cache, $this->config, $this->db, $this->modules_helper, $user));
|
||||
$template = $this->getMock('\phpbb\template', array('set_filenames', 'destroy_block_vars', 'assign_block_vars', 'assign_display'));
|
||||
$template = $this->getMockBuilder('\phpbb\template')
|
||||
->setMethods(['set_filenames', 'destroy_block_vars', 'assign_block_vars', 'assign_display'])
|
||||
->getMock();
|
||||
}
|
||||
|
||||
public function getDataSet()
|
||||
@@ -200,7 +204,7 @@ class phpbb_functions_fetch_news_test extends \board3\portal\tests\testframework
|
||||
|
||||
if ($expected_exception)
|
||||
{
|
||||
$this->setExpectedException($expected_exception);
|
||||
$this->expectException($expected_exception);
|
||||
}
|
||||
|
||||
$fetch_posts = phpbb_fetch_posts($module_id, $forum_from, $permissions, $number_of_posts, $text_length, $time, $type, $start, $invert);
|
||||
@@ -241,7 +245,9 @@ class phpbb_functions_fetch_news_test extends \board3\portal\tests\testframework
|
||||
{
|
||||
global $cache, $phpbb_container;
|
||||
|
||||
$cache = $this->getMock('\phpbb\cache\cache', array('obtain_word_list', 'get', 'sql_exists', 'put'));
|
||||
$cache = $this->getMockBuilder('\phpbb\cache\driver\dummy')
|
||||
->setMethods(['obtain_word_list', 'get', 'sql_exists', 'put'])
|
||||
->getMock();
|
||||
$cache->expects($this->any())
|
||||
->method('obtain_word_list')
|
||||
->with()
|
||||
|
||||
@@ -17,7 +17,7 @@ class phpbb_unit_functions_functions_test extends \board3\portal\tests\testframe
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/styles.xml');
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
global $cache, $user, $phpbb_root_path;
|
||||
|
||||
@@ -25,8 +25,13 @@ class phpbb_unit_functions_functions_test extends \board3\portal\tests\testframe
|
||||
|
||||
$this->language_file_loader = new \phpbb\language\language_file_loader($phpbb_root_path, 'php');
|
||||
$this->language = new \phpbb\language\language($this->language_file_loader);
|
||||
$user = $this->getMock('\phpbb\user', array('optionget'), array($this->language, '\phpbb\datetime'));
|
||||
$cache = $this->getMock('\phpbb\cache\cache', array('obtain_word_list', 'sql_exists'));
|
||||
$user = $this->getMockBuilder('\phpbb\user')
|
||||
->setMethods(['optionget'])
|
||||
->setConstructorArgs([$this->language, '\phpbb\datetime'])
|
||||
->getMock();
|
||||
$cache = $this->getMockBuilder('\phpbb\cache\driver\dummy')
|
||||
->setMethods(['obtain_word_list', 'sql_exists'])
|
||||
->getMock();
|
||||
$cache->expects($this->any())
|
||||
->method('obtain_word_list')
|
||||
->with()
|
||||
|
||||
@@ -14,7 +14,7 @@ class phpbb_unit_functions_get_user_groups_test extends \board3\portal\tests\tes
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/user_groups.xml');
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
global $cache, $user, $phpbb_root_path;
|
||||
|
||||
@@ -22,8 +22,13 @@ class phpbb_unit_functions_get_user_groups_test extends \board3\portal\tests\tes
|
||||
|
||||
$this->language_file_loader = new \phpbb\language\language_file_loader($phpbb_root_path, 'php');
|
||||
$this->language = new \phpbb\language\language($this->language_file_loader);
|
||||
$user = $this->getMock('\phpbb\user', array('optionget'), array($this->language, '\phpbb\datetime'));
|
||||
$cache = $this->getMock('\phpbb\cache\cache', array('get', 'put', 'sql_exists'));
|
||||
$user = $this->getMockBuilder('\phpbb\user')
|
||||
->setMethods(['optionget'])
|
||||
->setConstructorArgs([$this->language, '\phpbb\datetime'])
|
||||
->getMock();
|
||||
$cache = $this->getMockBuilder('\phpbb\cache\driver\dummy')
|
||||
->setMethods(['get', 'put', 'sql_exists'])
|
||||
->getMock();
|
||||
$cache->expects($this->any())
|
||||
->method('get')
|
||||
->with($this->anything())
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_functions_simple_test extends PHPUnit_Framework_TestCase
|
||||
class phpbb_functions_simple_test extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
public function test_ap_validate()
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@ class board3_includes_helper_test extends \board3\portal\tests\testframework\tes
|
||||
|
||||
protected $modules;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$config = new \phpbb\config\config(array());
|
||||
$this->modules = array(
|
||||
|
||||
@@ -24,7 +24,7 @@ class board3_includes_modules_helper_test extends \board3\portal\tests\testframe
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/auth.xml');
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
global $phpbb_root_path, $phpEx, $phpbb_dispatcher;
|
||||
|
||||
@@ -36,7 +36,9 @@ class board3_includes_modules_helper_test extends \board3\portal\tests\testframe
|
||||
$controller_helper = new \board3\portal\tests\mock\controller_helper($phpbb_root_path, $phpEx);
|
||||
$controller_helper->add_route('board3_portal_controller', 'portal');
|
||||
$phpbb_container = new \phpbb_mock_container_builder();
|
||||
$phpbb_dispatcher = $this->getMock('\phpbb\event\dispatcher', array('trigger_event'), array($phpbb_container));
|
||||
$phpbb_dispatcher = $this->getMockBuilder('\phpbb\event\dispatcher')
|
||||
->setMethods(['trigger_event'])
|
||||
->getMock();
|
||||
$phpbb_dispatcher->expects($this->any())
|
||||
->method('trigger_event')
|
||||
->with($this->anything())
|
||||
|
||||
@@ -31,7 +31,7 @@ class phpbb_unit_modules_birthday_list_test extends \board3\portal\tests\testfra
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/users.xml');
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
global $auth, $phpbb_dispatcher, $phpbb_root_path;
|
||||
|
||||
@@ -45,7 +45,9 @@ class phpbb_unit_modules_birthday_list_test extends \board3\portal\tests\testfra
|
||||
$this->user->timezone = new \DateTimeZone('UTC');
|
||||
$this->user->add_lang('common');
|
||||
$this->birthday_list = new \board3\portal\modules\birthday_list($this->config, $this->template, $this->new_dbal(), $this->user);
|
||||
$auth = $this->getMock('\phpbb\auth\auth', array('acl_get'));
|
||||
$auth = $this->getMockBuilder('\phpbb\auth\auth')
|
||||
->setMethods(['acl_get'])
|
||||
->getMock();
|
||||
$auth->expects($this->any())
|
||||
->method('acl_get')
|
||||
->with($this->anything())
|
||||
|
||||
@@ -35,7 +35,7 @@ class phpbb_unit_modules_calendar_test extends \board3\portal\tests\testframewor
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/configs.xml');
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
global $cache, $phpbb_root_path, $phpEx, $phpbb_dispatcher, $request, $user;
|
||||
@@ -80,7 +80,9 @@ class phpbb_unit_modules_calendar_test extends \board3\portal\tests\testframewor
|
||||
$this->calendar = new \board3\portal\modules\calendar(self::$config, $modules_helper, $this->template, $db, $this->request, dirname(__FILE__) . '/../../../', 'php', $user, $this->path_helper, $log);
|
||||
define('PORTAL_MODULES_TABLE', 'phpbb_portal_modules');
|
||||
define('PORTAL_CONFIG_TABLE', 'phpbb_portal_config');
|
||||
$cache = $this->getMock('\phpbb\cache\cache', array('destroy', 'sql_exists', 'get', 'put'));
|
||||
$cache = $this->getMockBuilder('\phpbb\cache\driver\dummy')
|
||||
->setMethods(['destroy', 'sql_exists', 'get', 'put'])
|
||||
->getMock();
|
||||
$cache->expects($this->any())
|
||||
->method('destroy')
|
||||
->with($this->equalTo('portal_config'));
|
||||
@@ -122,7 +124,7 @@ class phpbb_unit_modules_calendar_test extends \board3\portal\tests\testframewor
|
||||
{
|
||||
$this->expected_config[$key] = $value;
|
||||
}
|
||||
|
||||
|
||||
$portal_config = obtain_portal_config();
|
||||
|
||||
foreach ($portal_config as $key => $value)
|
||||
|
||||
@@ -20,7 +20,7 @@ class phpbb_unit_modules_clock_test extends \board3\portal\tests\testframework\t
|
||||
/** @var \phpbb\config\config */
|
||||
protected $config;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ class phpbb_unit_modules_module_base_test extends \board3\portal\tests\testframe
|
||||
/** @var \board3\portal\modules\module_base */
|
||||
protected $module_base;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ class phpbb_unit_modules_search_test extends \board3\portal\tests\testframework\
|
||||
/** @var \board3\portal\modules\search */
|
||||
protected $search;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ class phpbb_unit_modules_welcome_test extends \board3\portal\tests\testframework
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/configs.xml');
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
global $cache, $phpbb_root_path, $phpEx, $phpbb_dispatcher, $request, $config, $phpbb_container, $user;
|
||||
@@ -48,7 +48,9 @@ class phpbb_unit_modules_welcome_test extends \board3\portal\tests\testframework
|
||||
$this->language = new \phpbb\language\language($this->language_file_loader);
|
||||
$this->user = new \phpbb\user($this->language, '\phpbb\datetime');
|
||||
$user = $this->user;
|
||||
$cache = $this->getMock('\phpbb\cache\cache', array('destroy', 'sql_exists', 'get', 'put', 'sql_load'));
|
||||
$cache = $this->getMockBuilder('\phpbb\cache\driver\dummy')
|
||||
->setMethods(['destroy', 'sql_exists', 'get', 'put', 'sql_load'])
|
||||
->getMock();
|
||||
$cache->expects($this->any())
|
||||
->method('destroy')
|
||||
->with($this->equalTo('portal_config'));
|
||||
@@ -74,12 +76,16 @@ class phpbb_unit_modules_welcome_test extends \board3\portal\tests\testframework
|
||||
->with($this->anything())
|
||||
->will($this->returnArgument(1));
|
||||
$phpbb_container = new \phpbb_mock_container_builder();
|
||||
$phpbb_log = $this->getMockBuilder('\phpbb\log\log')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
$s9e_factory = new \phpbb\textformatter\s9e\factory(
|
||||
new \phpbb\textformatter\data_access($this->db, BBCODES_TABLE, SMILIES_TABLE, STYLES_TABLE, WORDS_TABLE, $phpbb_root_path . 'styles/'),
|
||||
new \phpbb\cache\driver\dummy(),
|
||||
$phpbb_dispatcher,
|
||||
$config,
|
||||
new \phpbb\textformatter\s9e\link_helper(),
|
||||
$phpbb_log,
|
||||
$phpbb_root_path . 'cache',
|
||||
'_text_formatter_parser',
|
||||
'_text_formatter_renderer'
|
||||
|
||||
@@ -11,7 +11,7 @@ class board3_portal_columns_test extends \board3\portal\tests\testframework\test
|
||||
{
|
||||
protected $portal_columns;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@@ -64,4 +64,4 @@ class board3_portal_columns_test extends \board3\portal\tests\testframework\test
|
||||
{
|
||||
$this->assertEquals($constant, $this->portal_columns->string_to_constant($string));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ class phpbb_portal_fetch_posts_test extends \board3\portal\tests\testframework\d
|
||||
protected $default_main_columns = array('topic_count', 'global_id', 'topic_icons');
|
||||
protected $fetch_posts;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
global $auth, $cache, $phpbb_dispatcher, $phpbb_root_path, $phpEx, $template, $user;
|
||||
|
||||
@@ -34,7 +34,9 @@ class phpbb_portal_fetch_posts_test extends \board3\portal\tests\testframework\d
|
||||
$user->add_lang('common');
|
||||
$user->add_lang('../../ext/board3/portal/language/en/portal');
|
||||
$phpbb_dispatcher = new phpbb_mock_event_dispatcher();
|
||||
$cache = $this->getMock('\phpbb\cache\cache', array('obtain_word_list', 'get', 'sql_exists', 'put', 'obtain_attach_extensions', 'sql_load', 'sql_save'));
|
||||
$cache = $this->getMockBuilder('\phpbb\cache\driver\dummy')
|
||||
->setMethods(['obtain_word_list', 'get', 'sql_exists', 'put', 'obtain_attach_extensions', 'sql_load', 'sql_save'])
|
||||
->getMock();
|
||||
$cache->expects($this->any())
|
||||
->method('obtain_word_list')
|
||||
->with()
|
||||
@@ -67,7 +69,9 @@ class phpbb_portal_fetch_posts_test extends \board3\portal\tests\testframework\d
|
||||
$controller_helper->add_route('board3_portal_controller', 'portal');
|
||||
$this->modules_helper = new \board3\portal\includes\modules_helper($auth, $this->config, $controller_helper, new phpbb_mock_request());
|
||||
$this->user = $user;
|
||||
$template = $this->getMock('\phpbb\template', array('set_filenames', 'destroy_block_vars', 'assign_block_vars', 'assign_display'));
|
||||
$template = $this->getMockBuilder('\phpbb\template')
|
||||
->setMethods(['set_filenames', 'destroy_block_vars', 'assign_block_vars', 'assign_display'])
|
||||
->getMock();
|
||||
$this->fetch_posts = new \board3\portal\portal\fetch_posts($auth, $cache, $this->config, $this->db, $this->modules_helper, $user);
|
||||
}
|
||||
|
||||
@@ -202,7 +206,7 @@ class phpbb_portal_fetch_posts_test extends \board3\portal\tests\testframework\d
|
||||
|
||||
if ($expected_exception)
|
||||
{
|
||||
$this->setExpectedException($expected_exception);
|
||||
$this->expectException($expected_exception);
|
||||
}
|
||||
|
||||
$this->fetch_posts->set_module_id($module_id);
|
||||
@@ -244,7 +248,9 @@ class phpbb_portal_fetch_posts_test extends \board3\portal\tests\testframework\d
|
||||
{
|
||||
global $cache;
|
||||
|
||||
$cache = $this->getMock('\phpbb\cache\cache', array('obtain_word_list', 'get', 'sql_exists', 'put'));
|
||||
$cache = $this->getMockBuilder('\phpbb\cache\driver\dummy')
|
||||
->setMethods(['obtain_word_list', 'get', 'sql_exists', 'put'])
|
||||
->getMock();
|
||||
$cache->expects($this->any())
|
||||
->method('obtain_word_list')
|
||||
->with()
|
||||
|
||||
@@ -37,7 +37,7 @@ class modules_manager_confirm_box_test extends \board3\portal\tests\testframewor
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/../acp/fixtures/modules.xml');
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
global $cache, $db, $portal_config, $phpbb_root_path, $phpEx;
|
||||
|
||||
@@ -63,7 +63,9 @@ class modules_manager_confirm_box_test extends \board3\portal\tests\testframewor
|
||||
));
|
||||
|
||||
$this->portal_columns = new \board3\portal\portal\columns();
|
||||
$this->cache = $this->getMock('\phpbb\cache\cache', array('destroy', 'sql_exists', 'get', 'put', 'purge'));
|
||||
$this->cache = $this->getMockBuilder('\phpbb\cache\driver\dummy')
|
||||
->setMethods(['destroy', 'sql_exists', 'get', 'put', 'purge'])
|
||||
->getMock();
|
||||
$this->cache->expects($this->any())
|
||||
->method('destroy')
|
||||
->withConsecutive(array($this->equalTo('config')), array($this->equalTo('portal_config')));
|
||||
@@ -147,7 +149,9 @@ class modules_manager_confirm_box_test extends \board3\portal\tests\testframewor
|
||||
|
||||
public function test_module_delete()
|
||||
{
|
||||
$this->cache = $this->getMock('\phpbb\cache\cache', array('destroy', 'sql_exists', 'get', 'put', 'purge'));
|
||||
$this->cache = $this->getMockBuilder('\phpbb\cache\driver\dummy')
|
||||
->setMethods(['destroy', 'sql_exists', 'get', 'put', 'purge'])
|
||||
->getMock();
|
||||
$this->cache->expects($this->any())
|
||||
->method('destroy')
|
||||
->with($this->equalTo('sql'));
|
||||
|
||||
@@ -31,7 +31,7 @@ class board3_portal_modules_manager_test extends \board3\portal\tests\testframew
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/../acp/fixtures/modules.xml');
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
global $cache, $db, $phpbb_root_path, $phpEx;
|
||||
|
||||
@@ -55,7 +55,9 @@ class board3_portal_modules_manager_test extends \board3\portal\tests\testframew
|
||||
));
|
||||
|
||||
$this->portal_columns = new \board3\portal\portal\columns();
|
||||
$cache = $this->getMock('\phpbb\cache\cache', array('destroy', 'sql_exists', 'get', 'put', 'sql_load', 'sql_save'));
|
||||
$cache = $this->getMockBuilder('\phpbb\cache\driver\dummy')
|
||||
->setMethods(['destroy', 'sql_exists', 'get', 'put', 'sql_load', 'sql_save'])
|
||||
->getMock();
|
||||
$cache->expects($this->any())
|
||||
->method('destroy')
|
||||
->with($this->equalTo('portal_modules'));
|
||||
|
||||
Reference in New Issue
Block a user