aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Brooke <hi@broo.ke> 2021-02-19 15:35:53 -0800
committerGravatar GitHub <noreply@github.com> 2021-02-20 00:35:53 +0100
commit2942d64d4fbae0cfedab05b8518b4403c4fb8926 (patch)
treec6d2af9b66304717411b69c38be79e1a6411e3fe
parent4313c09e68056fe0c4cf9ddb9dc8d9ad5c92f1d9 (diff)
Update Travis.yaml to support newer PHP versions (#3459)
* Update Travis * Drop Older PHP Versions Drops PHP 7.1 and 7.3 from tests. Also updates Translations to use PHP 7.4 instead of 7.3 * Update Test Class Names to Fix Warnings This updates the Class name for 'CategoryTest', `passwordUtilTest.php`, and `MigratorTest.php`
-rw-r--r--.travis.yml22
-rw-r--r--tests/app/Models/CategoryTest.php2
-rw-r--r--tests/app/Utils/passwordUtilTest.php2
-rw-r--r--tests/lib/Minz/MigratorTest.php2
4 files changed, 15 insertions, 13 deletions
diff --git a/.travis.yml b/.travis.yml
index 4fd33d79b..da894af72 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,13 +4,15 @@ jobs:
fast_finish: true
allow_failures:
- name: "Translations"
+ - name: "PHP 8.0 Syntax, linter and tests"
+
include:
- - name: "PHP 7.3 Syntax, linter and tests"
- php: "7.3"
+ - name: "PHP 8.0 Syntax, linter and tests"
+ php: "8.0"
install:
- composer global require squizlabs/php_codesniffer
- - composer global require phpunit/phpunit ^7
+ - composer global require phpunit/phpunit ^9
script:
- phpenv rehash
- find . -name \*.php -print0 | xargs -0 -n1 -P4 php -l 1>/dev/null 2>php-l-results
@@ -18,18 +20,18 @@ jobs:
- COMPOSER_BIN=$(composer global config --absolute bin-dir)
- $COMPOSER_BIN/phpunit --bootstrap ./tests/bootstrap.php --verbose ./tests
- $COMPOSER_BIN/phpcs . --standard=phpcs.xml --warning-severity=0 --extensions=php -p
-
- - name: "PHP 7.1 Syntax and tests"
- php: "7.1"
+ - name: "PHP 7.4 Syntax, linter and tests"
+ php: "7.4"
install:
- - composer global require phpunit/phpunit ^7
+ - composer global require squizlabs/php_codesniffer
+ - composer global require phpunit/phpunit ^9
script:
- phpenv rehash
- find . -name \*.php -print0 | xargs -0 -n1 -P4 php -l 1>/dev/null 2>php-l-results
- if [ -s php-l-results ]; then cat php-l-results; exit 1; fi
- COMPOSER_BIN=$(composer global config --absolute bin-dir)
- $COMPOSER_BIN/phpunit --bootstrap ./tests/bootstrap.php --verbose ./tests
-
+ - $COMPOSER_BIN/phpcs . --standard=phpcs.xml --warning-severity=0 --extensions=php -p
- name: "PHP 5.6 Syntax"
php: "5.6"
script:
@@ -38,14 +40,14 @@ jobs:
- if [ -s php-l-results ]; then cat php-l-results; exit 1; fi
- name: "Translations format"
- php: "7.3"
+ php: "7.4"
script:
- phpenv rehash
- php cli/manipulate.translation.php -a format
- git diff --exit-code
- name: "Translations"
- php: "7.3"
+ php: "7.4"
script:
- phpenv rehash
- php cli/check.translation.php -r
diff --git a/tests/app/Models/CategoryTest.php b/tests/app/Models/CategoryTest.php
index a1edb17b6..840c718ce 100644
--- a/tests/app/Models/CategoryTest.php
+++ b/tests/app/Models/CategoryTest.php
@@ -1,6 +1,6 @@
<?php
-class FreshRSS_CategoryTest extends PHPUnit\Framework\TestCase {
+class CategoryTest extends PHPUnit\Framework\TestCase {
public function test__construct_whenNoParameters_createsObjectWithDefaultValues() {
$category = new FreshRSS_Category();
diff --git a/tests/app/Utils/passwordUtilTest.php b/tests/app/Utils/passwordUtilTest.php
index 90c05004f..ddccb784f 100644
--- a/tests/app/Utils/passwordUtilTest.php
+++ b/tests/app/Utils/passwordUtilTest.php
@@ -1,6 +1,6 @@
<?php
-class FreshRSS_password_UtilTest extends PHPUnit\Framework\TestCase {
+class passwordUtilTest extends PHPUnit\Framework\TestCase {
public function testCheck() {
$password = '1234567';
diff --git a/tests/lib/Minz/MigratorTest.php b/tests/lib/Minz/MigratorTest.php
index 8f23895aa..d4b1e030c 100644
--- a/tests/lib/Minz/MigratorTest.php
+++ b/tests/lib/Minz/MigratorTest.php
@@ -2,7 +2,7 @@
use PHPUnit\Framework\TestCase;
-class Minz_MigratorTest extends TestCase
+class MigratorTest extends TestCase
{
public function testAddMigration() {
$migrator = new Minz_Migrator();