Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cover unknown constants in tests #400

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

cover unknown constants in tests #400

wants to merge 2 commits into from

Conversation

staabm
Copy link
Owner

@staabm staabm commented May 31, 2022

No description provided.

@staabm
Copy link
Owner Author

staabm commented May 31, 2022

let see we can sent a more meaningful error then what we have right now:

phpunit -c tests/rules/config/phpunit.xml
PHPUnit 9.5.20 #StandWithUkraine

..F..SS.SS..SS....                                                18 / 18 (100%)

Time: 00:03.063, Memory: 134.00 MB

There was 1 failure:

1) staabm\PHPStanDba\Tests\QueryPlanAnalyzerRuleTest::testNotUsingIndexInDebugMode
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
     💡 see Mysql Docs https://dev.mysql.com/doc/refman/8.0/en/select-optimization.html
 61: Unresolvable Query: Cannot simulate parameter value for type: mixed.
     💡 Make sure all variables involved have a non-mixed type and array-types are specified.
+66: Unresolvable Query: Cannot simulate parameter value for type: *ERROR*.
+    💡 Make sure all variables involved have a non-mixed type and array-types are specified.
 '

phar://C:/dvl/Workspace/phpstan-dba/vendor/phpstan/phpstan/phpstan.phar/src/Testing/RuleTestCase.php:83
C:\dvl\Workspace\phpstan-dba\tests\rules\QueryPlanAnalyzerRuleTest.php:113

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants