tec: Fix test suite#2721
Conversation
|
|
ce00960 to
9fd76e5
Compare
Is there a particular reason this is an issue? The tests are from 2015. |
|
Yes, |
Something along those lines makes more sense to me, because PHP 7.2+ is probably what we run while writing code. By along those lines I mean that for example PHPUnit 6/PHP 7.0 could be an interesting compromise for using features like createMock. (I can't seem to find when these methods were added.) |
Question is: for which versions do we want to run the test suite? I implicitly answered by "PHP 7.3" because it was an easy solution: the syntax is checked for PHP 5.6 and 7.3, and the FRSS logic doesn't differ between PHP versions. Problems can happen if default values change in PHP functions from a version to another though, or using a non-existing functions. My preference was to use an up-to-date version of PHPUnit, considering that our test coverage is so low that it wouldn't make a big difference to test on several PHP versions. It's a short term opinion but we'll probably stop support of PHP 5.6 and 7.0 in few months/years (official support stopped 1 year ago). |
4158e02 to
7ec0454
Compare
|
It doesn't matter too much for now, but in principle I think the tests should be run on multiple PHP versions. It's about behavior, not about syntax. |
9e19cb4 to
d89a0f6
Compare
|
I've setup tests for 7.1 and 7.3. I think it's more important to test latest supported versions than oldest. Also it allows to use PHPUnit 7 which is still supported for few weeks. |
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.
The category `_name` regression was introduced in commit b323ed0. I wasn't able to understand when and why Search tests was wrong. The rest is about upgrade of PHPUnit.
d89a0f6 to
32b7d85
Compare
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:
case but it was hard to understand the way it was done)
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.