1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00
psalm/tests/TypeReconciliation
Bruce Weirdan 1cf5153700
Test parallelization (#4045)
* Run tests in random order

Being able to run tests in any order is a pre-requisite for being able
to run them in parallel.

* Reset type coverage between tests, fix affected tests

* Reset parser and lexer between test runs and on php version change

Previously lexer was reset, but parser kept the reference to the old
one, and reference to the parser was kept by StatementsProvider. This
resulted in order-dependent tests - if the parser was first initialized
with phpVersion set to 7.4 then arrow functions worked fine, but were
failing when the parser was initially constructed with settings for 7.3

This can be demonstrated on current master by upgrading to
nikic/php-parser:4.9 and running:

```
vendor/bin/phpunit --no-coverage --filter="inferredArgArrowFunction" tests/ClosureTest.php
```

Now all tests using PHP 7.4 features must set the PHP version
accordingly.

* Marked more tests using 7.4 syntax

* Reset newline-between-annotation flag between tests

* Resolve real paths before passing them to checkPaths

When checkPaths is called from psalm.php the paths are resolved, so we
just mimicking SUT behaviour here.

* Restore newline-between-annotations in DocCommentTest

* Tweak Appveyor caches

* Tweak TravisCI caches

* Tweak CircleCI caches

* Run tests in parallel

Use `vendor/bin/paratest` instead of `vendor/bin/phpunit`

* Use default paratest runner on Windows

WrapperRunner is not supported on Windows.

* TRAVIS_TAG could be empty

* Restore appveyor conditional caching
2020-08-23 10:32:07 -04:00
..
ConditionalTest.php Fix #3917 - allow comparisons between classes and interfaces 2020-08-16 16:25:59 -04:00
EmptyTest.php Fix PSR-4 deprecation notices on composer install (#3959) 2020-08-07 23:22:30 -04:00
IssetTest.php Fix PSR-4 deprecation notices on composer install (#3959) 2020-08-07 23:22:30 -04:00
ReconcilerTest.php Refactor type comparison 2020-07-21 19:40:35 -04:00
RedundantConditionTest.php Fix #3934 - prevent unsafe use of new static 2020-08-05 19:39:27 -04:00
ScopeTest.php Fix #2915 - prevent "if (true)" and similar 2020-03-15 22:23:31 -04:00
TypeAlgebraTest.php Fix #3932 - try to get assertions of negated expression if instant negation fails 2020-08-05 16:53:30 -04:00
TypeTest.php Fix #3934 - prevent unsafe use of new static 2020-08-05 19:39:27 -04:00
ValueTest.php Test parallelization (#4045) 2020-08-23 10:32:07 -04:00