summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2020-07-09 09:42:15 +0200
committerAndrey Andreev <narf@devilix.net>2020-07-09 09:47:41 +0200
commit20ddc4692ed4d91cfbeae3354c0e5ef518b882a3 (patch)
tree53833260c07d9801057d6511279536785e9f80c1
parentf27b3409b00c6a08d89c1e6b06e5f1b9463d703d (diff)
Merge pull request #5946 from sapics/travis/php74
Pass the travis php7.4 test
-rw-r--r--.travis.yml92
-rw-r--r--tests/codeigniter/helpers/text_helper_test.php7
2 files changed, 74 insertions, 25 deletions
diff --git a/.travis.yml b/.travis.yml
index e5926224a..990a962cd 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,20 +1,17 @@
language: php
-dist: trusty
+os: linux
+dist: xenial
php:
- - 5.4
- - 5.5
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
- - 7.4snapshot
+ - 7.4
- nightly
- - hhvm-3.30
-
+
env:
- - DB=mysql
- DB=mysqli
- DB=pgsql
- DB=sqlite
@@ -22,19 +19,24 @@ env:
- DB=pdo/pgsql
- DB=pdo/sqlite
-sudo: false
+services:
+ - mysql
+ - postgresql
+
+cache:
+ directories:
+ - $HOME/.composer/cache
before_script:
- - sh -c "composer install --dev --no-progress"
+ - sh -c "composer install --no-progress"
- sh -c "if [ '$DB' = 'pgsql' ] || [ '$DB' = 'pdo/pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS ci_test;' -U postgres; fi"
- sh -c "if [ '$DB' = 'pgsql' ] || [ '$DB' = 'pdo/pgsql' ]; then psql -c 'create database ci_test;' -U postgres; fi"
- sh -c "if [ '$DB' = 'mysql' ] || [ '$DB' = 'mysqli' ] || [ '$DB' = 'pdo/mysql' ]; then mysql -e 'create database IF NOT EXISTS ci_test;'; fi"
script: php -d zend.enable_gc=0 -d date.timezone=UTC -d mbstring.func_overload=7 -d mbstring.internal_encoding=UTF-8 vendor/bin/phpunit --coverage-text --configuration tests/travis/$DB.phpunit.xml
-matrix:
+jobs:
allow_failures:
- - php: 7.4snapshot
- php: nightly
- php: hhvm-3.30
include:
@@ -59,24 +61,66 @@ matrix:
- php: 5.3
dist: precise
env: DB=pdo/sqlite
-
- exclude:
- - php: hhvm-3.30
+ - php: 5.4
+ dist: trusty
+ env: DB=mysql
+ - php: 5.4
+ dist: trusty
+ env: DB=mysqli
+ - php: 5.4
+ dist: trusty
env: DB=pgsql
- - php: hhvm-3.30
+ - php: 5.4
+ dist: trusty
+ env: DB=sqlite
+ - php: 5.4
+ dist: trusty
+ env: DB=pdo/mysql
+ - php: 5.4
+ dist: trusty
env: DB=pdo/pgsql
- - php: 7.0
- env: DB=mysql
- - php: 7.1
- env: DB=mysql
- - php: 7.2
- env: DB=mysql
- - php: 7.3
+ - php: 5.4
+ dist: trusty
+ env: DB=pdo/sqlite
+ - php: 5.5
+ dist: trusty
env: DB=mysql
- - php: 7.4snapshot
+ - php: 5.5
+ dist: trusty
+ env: DB=mysqli
+ - php: 5.5
+ dist: trusty
+ env: DB=pgsql
+ - php: 5.5
+ dist: trusty
+ env: DB=sqlite
+ - php: 5.5
+ dist: trusty
+ env: DB=pdo/mysql
+ - php: 5.5
+ dist: trusty
+ env: DB=pdo/pgsql
+ - php: 5.5
+ dist: trusty
+ env: DB=pdo/sqlite
+ - php: 5.6
+ dist: xenial
env: DB=mysql
- - php: nightly
+ - php: hhvm-3.30
+ dist: trusty
env: DB=mysql
+ - php: hhvm-3.30
+ dist: trusty
+ env: DB=mysqli
+ - php: hhvm-3.30
+ dist: trusty
+ env: DB=sqlite
+ - php: hhvm-3.30
+ dist: trusty
+ env: DB=pdo/mysql
+ - php: hhvm-3.30
+ dist: trusty
+ env: DB=pdo/sqlite
branches:
only:
diff --git a/tests/codeigniter/helpers/text_helper_test.php b/tests/codeigniter/helpers/text_helper_test.php
index 7a7dc0a12..b6902c016 100644
--- a/tests/codeigniter/helpers/text_helper_test.php
+++ b/tests/codeigniter/helpers/text_helper_test.php
@@ -64,7 +64,12 @@ class Text_helper_test extends CI_TestCase {
public function test_convert_accented_characters()
{
- $this->ci_vfs_clone('application/config/foreign_chars.php');
+ $path = 'application/config/foreign_chars.php';
+ $this->ci_vfs_clone($path);
+ if (is_php('7.4'))
+ {
+ copy(PROJECT_BASE.$path, APPPATH.'../'.$path);
+ }
$this->assertEquals('AAAeEEEIIOOEUUUeY', convert_accented_characters('ÀÂÄÈÊËÎÏÔŒÙÛÜŸ'));
$this->assertEquals('a e i o u n ue', convert_accented_characters('á é í ó ú ñ ü'));
}