Skip to content

[Test] Enable displayDetailsOnTestsThatTriggerWarnings to true in tests to show warning#4020

Merged
TomasVotruba merged 2 commits intomainfrom
enable-display-warning
May 29, 2023
Merged

[Test] Enable displayDetailsOnTestsThatTriggerWarnings to true in tests to show warning#4020
TomasVotruba merged 2 commits intomainfrom
enable-display-warning

Conversation

@samsonasik
Copy link
Copy Markdown
Member

@samsonasik samsonasik commented May 29, 2023

To properly show erorrs:

vendor/bin/phpunit tests/Issues                                                                           
PHPUnit 10.1.3 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.2.5
Configuration: /Users/samsonasik/www/rector-src/phpunit.xml

...............................................................  63 / 179 ( 35%)
.............W..W.............................................. 126 / 179 ( 70%)
.....................................................           179 / 179 (100%)

Time: 00:19.685, Memory: 1.18 GB

2 tests triggered 2 PHP warnings:

1) Rector\Core\Tests\Issues\Issue6496\AutoImportDocBlockTest::test with data set #1
Undefined array key 0
/Users/samsonasik/www/rector-src/rules/CodingStyle/Application/UseImportsAdder.php:119

/Users/samsonasik/www/rector-src/tests/Issues/Issue6496/AutoImportDocBlockTest.php:14

2) Rector\Core\Tests\Issues\Issue6496\AutoImportDocBlockTest::test with data set #2
Undefined array key 0
/Users/samsonasik/www/rector-src/rules/CodingStyle/Application/UseImportsAdder.php:119

/Users/samsonasik/www/rector-src/tests/Issues/Issue6496/AutoImportDocBlockTest.php:14

OK, but there are issues!
Tests: 179, Assertions: 191, Warnings: 2.

Ref rectorphp/rector#7958

@samsonasik samsonasik requested a review from TomasVotruba as a code owner May 29, 2023 13:53
@samsonasik
Copy link
Copy Markdown
Member Author

@TomasVotruba Fixed 🎉

@samsonasik
Copy link
Copy Markdown
Member Author

It seems also happen in other rector packages, I will enable in them.

@TomasVotruba TomasVotruba merged commit 3dfe7f9 into main May 29, 2023
@TomasVotruba TomasVotruba deleted the enable-display-warning branch May 29, 2023 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants