diff options
| author | 2019-12-23 11:00:22 +0100 | |
|---|---|---|
| committer | 2019-12-23 11:00:22 +0100 | |
| commit | 8f5d8af72f91e3fa1d47717379570964fe970069 (patch) | |
| tree | ed089f75bfc7070ac1192f6e235387a70f0d0258 /tests/app/Models/SearchTest.php | |
| parent | 61fb6f8b86a3fc395dcfa16abab2c94ad3be5b27 (diff) | |
tec: Fix test suite (#2721)
* Rework the travis file to enable PHPUnit
I realized that unit tests weren't executed on Travis. While working on
this file to enable these tests, I started to think we could simplify
it.
I separated jobs so:
- PHP linter and tests are only performed on PHP 7.3
- Translations are tested separatly so they can fail (it was already the
case but it was hard to understand the way it was done)
- PHP 5.6 only checks syntax issues
- the last job checks css, js, etc. (it didn't change)
PHPUnit is not executed on 5.6 because only the version 5 is available
while the latest version is the 8 (https://phpunit.de/supported-versions.html).
I think it's easier to read (each job is more explicit) but I'm not a
Travis expert so maybe there's some room for improvements.
* Fix failing tests
The category `_name` regression was introduced in commit b323ed084.
I wasn't able to understand when and why Search tests was wrong.
The rest is about upgrade of PHPUnit.
Diffstat (limited to 'tests/app/Models/SearchTest.php')
| -rw-r--r-- | tests/app/Models/SearchTest.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/app/Models/SearchTest.php b/tests/app/Models/SearchTest.php index 5c0469a48..22070351c 100644 --- a/tests/app/Models/SearchTest.php +++ b/tests/app/Models/SearchTest.php @@ -150,8 +150,8 @@ class SearchTest extends PHPUnit\Framework\TestCase { public function provideDateSearch() { return array( array('date:2007-03-01T13:00:00Z/2008-05-11T15:30:00Z', '1172754000', '1210519800'), - array('date:2007-03-01T13:00:00Z/P1Y2M10DT2H30M', '1172754000', '1210516199'), - array('date:P1Y2M10DT2H30M/2008-05-11T15:30:00Z', '1172757601', '1210519800'), + array('date:2007-03-01T13:00:00Z/P1Y2M10DT2H30M', '1172754000', '1210519799'), + array('date:P1Y2M10DT2H30M/2008-05-11T15:30:00Z', '1172754001', '1210519800'), array('date:2007-03-01/2008-05-11', strtotime('2007-03-01'), strtotime('2008-05-12') - 1), array('date:2007-03-01/', strtotime('2007-03-01'), ''), array('date:/2008-05-11', '', strtotime('2008-05-12') - 1), @@ -176,8 +176,8 @@ class SearchTest extends PHPUnit\Framework\TestCase { public function providePubdateSearch() { return array( array('pubdate:2007-03-01T13:00:00Z/2008-05-11T15:30:00Z', '1172754000', '1210519800'), - array('pubdate:2007-03-01T13:00:00Z/P1Y2M10DT2H30M', '1172754000', '1210516199'), - array('pubdate:P1Y2M10DT2H30M/2008-05-11T15:30:00Z', '1172757601', '1210519800'), + array('pubdate:2007-03-01T13:00:00Z/P1Y2M10DT2H30M', '1172754000', '1210519799'), + array('pubdate:P1Y2M10DT2H30M/2008-05-11T15:30:00Z', '1172754001', '1210519800'), array('pubdate:2007-03-01/2008-05-11', strtotime('2007-03-01'), strtotime('2008-05-12') - 1), array('pubdate:2007-03-01/', strtotime('2007-03-01'), ''), array('pubdate:/2008-05-11', '', strtotime('2008-05-12') - 1), |
