Commit Graph

44 Commits

Author SHA1 Message Date
Bruce Weirdan
62e82e7c1e
Fixed tests by adjusting the expectations to what Psalm now produces 2020-11-03 00:13:31 +02:00
Bruce Weirdan
54c50d64ef
Adjust expectations to what Psalm now reports 2020-09-19 00:52:59 +03:00
Bruce Weirdan
b5c88b5cd8
Allow errors with pure callables 2020-09-19 00:48:11 +03:00
Bruce Weirdan
9c11bac834
Fix Prophecy-related issues
1. `prophesize()` has always been protected, not public
2. Provide generic definition for `prophesize()` implemented by `phpspec/prophecy-phpunit`
2020-08-24 22:32:11 +03:00
Vladyslav Startsev
c855857457 fix annotation 2020-06-19 01:38:51 +03:00
Feek
cd2ebfae14 test: test cases for Argument::that 2020-05-24 13:06:31 -07:00
Bruce Weirdan
786e0bd1d3
Updated tests to account for changed Psalm output
Psalm started to distinguish shapes from tuples so its error messages
changed.
2020-05-24 22:29:52 +03:00
Bruce Weirdan
63838b8e39
Bump PHPUnit to 7.5+
Codeception 4.x is not compatible with lower versions
2020-04-05 21:43:16 +03:00
Bruce Weirdan
20e147f40d
Update to Codeception 4.x 2020-04-05 21:41:57 +03:00
Ilian Ranguelov
4e1e824b83
apply PSR-4 to tests 2020-04-03 20:27:38 +02:00
Bruce Weirdan
8f98135364
Store external dataprovider references in afterClassLikeVisit
This fixes false-positive UndefinedClass issues when Psalm is run on a
single test file with cold cache.

Fixes psalm/psalm-plugin-phpunit#57
2020-03-30 04:50:31 +03:00
Bruce Weirdan
ab21faac5c
Fix unrelated test failure 2020-03-30 04:47:58 +03:00
Bruce Weirdan
fc18507f97
Added support for external providers
Fixes psalm/phpunit-psalm-plugin#44
2020-01-10 02:02:25 +02:00
Bruce Weirdan
64f821ca65
Trim specials
Fixes psalm/phpunit-psalm-plugin#38
2019-11-27 17:00:26 +02:00
Bruce Weirdan
3c37434a0b
Updated tests 2019-11-17 05:40:42 +02:00
Bruce Weirdan
0c2fd1e6fe
Fixed code style violations
The codesniffer standard must have become stricter
2019-11-14 04:34:10 +02:00
Bruce Weirdan
ca1b7cdb07
Don't crash on invalid docblocks
Exception is simply suppressed because Psalm will re-analyze (and
properly report) invalid docblock without further assistance.

Refs psalm/phpunit-psalm-plugin#36
2019-07-10 22:26:24 +03:00
Bruce Weirdan
4f64be0b64
Bumped Psalm version
This fixes the problem with provider usage data being cached
See vimeo/psalm#1879
2019-06-30 19:02:03 +03:00
Bruce Weirdan
81aae541b2
Dropped debugging group 2019-06-30 04:26:30 +03:00
Bruce Weirdan
c0f8a977c2
Fixed remaining failures
- Dropped unused var
- Added a workaround (dirty hack really) for changed type structure of
...$rest types
- Fixed missing errors (tests weren't using totallyTyped)
- Fixed problem with invariant ArrayObject
- Circumvented the problem with sticky method usage data (not really
fixed, but tests are passing now)
- Relaxed error message expectations
2019-06-30 02:55:36 +03:00
Bruce Weirdan
471fa67623
Fixed easiest build failures
- Syntax error in Acceptance helper
- Adjust expected output to match newer Psalm version (and use wildcards
where possible)
2019-06-30 00:00:39 +03:00
Brown
2f4c528194 Fix version method 2019-05-16 18:26:16 -04:00
Matthew Brown
ead43e34d0
Bump versions 2019-05-16 18:02:18 -04:00
Bruce Weirdan
acfaba05d9
Fix psalm/phpunit-psalm-plugin#27 2019-03-06 21:48:43 +02:00
Bruce Weirdan
12cfb4d1eb
Use is_optional instead of default_type
Refs psalm/phpunit-psalm-plugin#25
2019-03-06 21:00:09 +02:00
Bruce Weirdan
c386b3e45d
Support variadics in test methods 2019-03-02 19:41:12 +02:00
Bruce Weirdan
db9c31ee51
Added support for test methods and providers in traits
Fixes psalm/phpunit-psalm-plugin#21
2019-03-01 20:29:19 +02:00
Bruce Weirdan
d36820eeea
Fix psalm/phpunit-psalm-plugin#19 2019-02-27 17:45:40 +02:00
Bruce Weirdan
089a9c092e
Fix psalm/phpunit-psalm-plugin#16 2019-02-24 01:45:02 +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
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
d9277bb993
Bumped Psalm version to 3.0.10
Breaking change: minimum psalm version is now 3.0.10 (due to the hook
interface added in that version)

Also fixed test to be compatible with legacy PHPUnit
2019-02-18 18:16:13 +02:00
Bruce Weirdan
ab2a87ee3c
Check for missing dataProviders 2019-02-18 17:51:21 +02:00
Bruce Weirdan
91ab7883bf
Update to weirdan/codeception-psalm-module 0.2.1 2019-02-18 16:19:30 +02:00
Bruce Weirdan
839b82b9a9
PHP 7.0 compatibility 2019-02-17 08:46:13 +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
Bruce Weirdan
e081131e4c
Skip test when running with older Psalm 2019-02-14 13:48:46 +02:00
Bruce Weirdan
8b0805670e
Limit expectException()'s argument to throwables 2019-02-14 13:12:40 +02:00
SignpostMarv
3af740709d void is a reserved word 2019-02-13 21:03:21 +00:00
Bruce Weirdan
bc9d452c27
Test for Assert::assertIsNotCallable() 2019-02-11 05:31:17 +02:00
Bruce Weirdan
2f2ff0374f
Added PHPUnit 7.5 assertions 2019-02-11 05:31:13 +02:00
Bruce Weirdan
6e0f0643d6
Added test infrastructure
- Added Codeception scaffolding
- Added travis config
- Added example test
2019-02-09 09:20:40 +02:00