- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 6.9k
          Fix SQLite CommandTest skipped tests and minor fixes.
          #20648
        
          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
  
    Fix SQLite CommandTest skipped tests and minor fixes.
  
  #20648
              Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors SQLite-specific tests to verify that unsupported operations throw NotSupportedException instead of skipping them, and improves test coverage by parameterizing constraint tests with data providers. The changes also include code formatting improvements and better use of type hints.
Key Changes
- Converted SQLite constraint tests from markTestSkippedto actually testing thatNotSupportedExceptionis thrown
- Refactored primary key, foreign key, and unique constraint tests to use data providers for better test coverage
- Improved code formatting and consistency across test files
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description | 
|---|---|
| tests/framework/db/CommandTest.php | Added data providers for constraint tests, refactored tests to accept parameterized inputs, improved MySQL version check specificity, and enhanced code formatting | 
| tests/framework/db/sqlite/CommandTest.php | Changed SQLite tests to verify NotSupportedExceptionis thrown for unsupported operations, added new test methods, improved code formatting, and updated exception handling patterns | 
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Maksim Spirkov <[email protected]> Co-authored-by: Samuel Rajan D <[email protected]> Fix #20640: Fix `@param` annotation for `$block` in `yii\console\Markdown::renderParagraph()` Fix #20645: Add missing generics in `yii\helpers` and `yii\test` namespaces. Fix PHPDoc annotations in `ArrayAccessTrait` Fix #20651: Add missing generics in `yii\filters` namespace Fix #20654: Add missing generics in `yii\db` namespace. Fix PHPDoc annotations in `yii\db\ArrayExpression` Fix #20650: Add PHPStan/Psalm annotations for `yii\di\Container` Fix SQLite `CommandTest` skipped tests and minor fixes. (#20648) Fix #20642: Pass `$model` and `$attribute` in Compare Validator's compareValue property closure
Before:
After: