Commit Graph

12 Commits

Author SHA1 Message Date
Bruce Weirdan
089a9c092e
Fix psalm/phpunit-psalm-plugin#16 2019-02-24 01:45:02 +02:00
Bruce Weirdan
c13cf7b5fa
Addressed code review comments 2019-02-23 20:15:07 +02:00
Bruce Weirdan
586c2ef133
PHP 7.0 compatibility 2019-02-23 16:19:57 +02:00
Bruce Weirdan
3452ea5d76
Fixes after psalm smoke tests
- More possibly-different handling
- Handle possibly-undefined offsets for dataset shapes
2019-02-23 16:11:53 +02:00
Bruce Weirdan
6025f28933
Fix empty union crash, clarify invalid provider message 2019-02-22 22:41:23 +02:00
Bruce Weirdan
4fe3c88aca
Tweak dead code detection on TestCase descendants
- Don't report TestCase descendants as unused
- Don't report test methods as unused
- Don't report providers referenced by test methods as unused

Refs psalm/phpunit-psalm-plugin#13

/cc @SignpostMarv
2019-02-20 13:19:11 +02:00
Bruce Weirdan
330b3a1ef6
Added getKeyValueParamsForTraversableObject proxy 2019-02-20 01:21:21 +02:00
Bruce Weirdan
6906f62cfa
Fixed reported type for invalid iterables 2019-02-20 00:52:07 +02:00
Bruce Weirdan
17d8351c40
PHP 7.0 compatibility 2019-02-20 00:05:32 +02:00
Bruce Weirdan
8732175020
Implemented provider type checks
- Invalid providers (should be iterable with array elements)
- Providers returning fewer arguments then test requires
- Providers returning datasets that are incompatible with test
signatures

refs psalm/phpunit-psalm-plugin#13
2019-02-19 22:58:56 +02:00
Bruce Weirdan
ab2a87ee3c
Check for missing dataProviders 2019-02-18 17:51:21 +02:00
Bruce Weirdan
f5ddd1dffb
Suppress missing constructor for TestCase descendants
When there are any initializers (`setUp` or `@before`) it's quite likely
properties were initialized there. As a followup development, we may
later implement more fine-grained checks to see what actually been
initialized in those methods.
2019-02-17 08:28:22 +02:00