diff --git a/.travis.yml b/.travis.yml
index 700f13f..625e263 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,30 +1,24 @@
language: php
-dist: trusty
+dist: xenial
matrix:
include:
- - php: 5.5
+ - php: 7.1
env: DB=none;NOTESTS=1
- - php: 5.4
- env: DB=mysqli #myisam
- - php: 5.4
- env: DB=mysql
- - php: 5.4
+ - php: 7.1
env: DB=mariadb
- - php: 5.4
+ - php: 7.1
env: DB=postgres
- - php: 5.4
+ - php: 7.1
env: DB=sqlite3
- - php: 5.5
- env: DB=mysqli
- - php: 5.6
- env: DB=mysqli
- - php: 7.0
- env: DB=mysqli
- php: 7.1
- env: DB=mysqli
+ env: DB=mysqli # MyISAM
- php: 7.2
env: DB=mysqli
+ - php: 7.3
+ env: DB=mysqli
+ - php: 7.4snapshot
+ env: DB=mysqli
- php: nightly
env: DB=mysqli
allow_failures:
@@ -37,7 +31,7 @@ env:
- SNIFF="1" # Should we run code sniffer on your code?
- IMAGE_ICC="1" # Should we run icc profile sniffer on your images?
- EPV="1" # Should we run EPV (Extension Pre Validator) on your code?
- - PHPBB_BRANCH="3.2.x"
+ - PHPBB_BRANCH="3.3.x"
branches:
only:
@@ -46,8 +40,12 @@ branches:
- /^develop-.*$/
- /^\d+(\.\d+)?\.x$/
+services:
+ - postgresql
+ - mysql
+
install:
- - travis/prepare-phpbb.sh $EXTNAME $PHPBB_BRANCH
+ - travis/prepare-phpbb.sh $PHPBB_BRANCH
- cd ../../phpBB3
- travis/prepare-extension.sh $EXTNAME $PHPBB_BRANCH
- travis/setup-phpbb.sh $DB $TRAVIS_PHP_VERSION $NOTESTS
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 289449d..574c6b9 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -8,7 +8,6 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
- syntaxCheck="false"
verbose="true"
bootstrap="../../../../tests/bootstrap.php"
>
@@ -18,14 +17,11 @@
./tests/functional
- ./tests/functional/
+ ./tests/functional/
-
- ./tests/
-
./
diff --git a/tests/event/email_change_notification_test.php b/tests/event/email_change_notification_test.php
index 3e75f40..5da3f34 100644
--- a/tests/event/email_change_notification_test.php
+++ b/tests/event/email_change_notification_test.php
@@ -153,10 +153,9 @@ public function test_email_change_notification($listener, $enabled, $in_watch_gr
$this->set_listener();
- $this->listener->expects($this->any())
+ $this->listener->expects($this->atMost(1))
->method('in_watch_group')
- ->will($this->returnValue($in_watch_group)
- );
+ ->willReturn($in_watch_group);
// Check send_message once if conditions are true,
// otherwise check that it is never called.
diff --git a/tests/event/failed_logins_test.php b/tests/event/failed_logins_test.php
index 6e3c4e9..dd1a7d5 100644
--- a/tests/event/failed_logins_test.php
+++ b/tests/event/failed_logins_test.php
@@ -40,10 +40,9 @@ public function test_log_failed_login_attempts($enabled, $in_watch_group, $resul
$this->set_listener();
- $this->listener->expects($this->any())
+ $this->listener->expects($this->atMost(1))
->method('in_watch_group')
- ->will($this->returnValue($in_watch_group)
- );
+ ->willReturn($in_watch_group);
// Check log->add is called once with expected data if enabled and in_watch_group are true,
// otherwise check that it is never called.
diff --git a/tests/event/team_passwords_test.php b/tests/event/team_passwords_test.php
index 1b9a6cf..51ec0ea 100644
--- a/tests/event/team_passwords_test.php
+++ b/tests/event/team_passwords_test.php
@@ -51,10 +51,9 @@ public function test_set_team_password_configs($listener, $mode, $user_row, $sec
$this->set_listener();
- $this->listener->expects($this->any())
+ $this->listener->expects($this->atMost(1))
->method('in_watch_group')
- ->will($this->returnValue($in_watch_group)
- );
+ ->willReturn($in_watch_group);
$dispatcher = new \Symfony\Component\EventDispatcher\EventDispatcher();
$dispatcher->addListener($listener, array($this->listener, 'set_team_password_configs'));
diff --git a/tests/functional/functional_test.php b/tests/functional/functional_test.php
index 89ec28f..a686aff 100644
--- a/tests/functional/functional_test.php
+++ b/tests/functional/functional_test.php
@@ -15,7 +15,7 @@
*/
class functional_test extends \phpbb_functional_test_case
{
- static protected function setup_extensions()
+ protected static function setup_extensions()
{
return array('phpbb/teamsecurity');
}
diff --git a/travis/prepare-epv.sh b/travis/prepare-epv.sh
index 51e91a8..31c7c2f 100755
--- a/travis/prepare-epv.sh
+++ b/travis/prepare-epv.sh
@@ -14,7 +14,7 @@ set -x
EPV=$1
NOTESTS=$2
-if [ "$EPV" == "1" -a "$NOTESTS" == "1" ]
+if [ "$EPV" == "1" ] && [ "$NOTESTS" == "1" ]
then
cd phpBB
composer remove sami/sami --update-with-dependencies --dev --no-interaction
diff --git a/travis/prepare-phpbb.sh b/travis/prepare-phpbb.sh
index 01770ad..a2cc81c 100755
--- a/travis/prepare-phpbb.sh
+++ b/travis/prepare-phpbb.sh
@@ -11,9 +11,7 @@
set -e
set -x
-EXTNAME=$1
-BRANCH=$2
-EXTPATH_TEMP=$3
+BRANCH=$1
# Copy extension to a temp folder
mkdir ../../tmp
@@ -21,4 +19,4 @@ cp -R . ../../tmp
cd ../../
# Clone phpBB
-git clone --depth=1 "git://github.com/phpbb/phpbb.git" "phpBB3" --branch=$BRANCH
+git clone --depth=1 "git://github.com/phpbb/phpbb.git" "phpBB3" --branch="$BRANCH"