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

Fix tests according to main PR #281

Closed
wants to merge 1 commit into from

Conversation

Tigrov
Copy link
Member

@Tigrov Tigrov commented Oct 26, 2023

Related with yiisoft/db#766

Q A
Is bugfix?
New feature?
Breaks BC?
Fixed issues -

@what-the-diff
Copy link

what-the-diff bot commented Oct 26, 2023

PR Summary

  • Class Import and Method Addition
    A new ColumnInterface class was imported into the CommandTest.php file and a new columnTypes() method was added to CommandProvider.php. This lays the groundwork for more flexible column handling in our database operations.

  • Refinements to the testAlterColumn() method
    In CommandTest.php, hard-coded column type in the testAlterColumn() method is now replaced with variable $type input. This allows for more flexible testing as we can now dynamically specify the column type. Additional assertions have been added to verify the database type and the nullable status of the altered data column - these are important checks to ensure our changes are correctly applied.

  • Enhancements in QueryBuilderTest.php
    The same ColumnInterface class was also imported into QueryBuilderTest.php and a new testAlterColumn() method was added. This test method accepts a column type argument and performs the necessary column alterations.
    Hard-coded column length was also replaced with the flexible $type argument. This ensures that our test can accommodate various column lengths.

  • New testAlterColumnWithConstraints() method
    A new method called testAlterColumnWithConstraints() has been added to QueryBuilderTest.php to test column alterations with constraints. It generates SQL commands for altering column with constraints, contributing to a more robust testing environment.

@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1be5ddb) 98.56% compared to head (767864d) 98.56%.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #281   +/-   ##
=========================================
  Coverage     98.56%   98.56%           
  Complexity      218      218           
=========================================
  Files            15       15           
  Lines           626      626           
=========================================
  Hits            617      617           
  Misses            9        9           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Tigrov
Copy link
Member Author

Tigrov commented Oct 26, 2023

Not required

@Tigrov Tigrov closed this Oct 26, 2023
@Tigrov Tigrov deleted the allow-columninterface-as-type branch October 26, 2023 15:32
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.

1 participant