Skip to content

Use short array syntax in tests - #255

Merged
harikt merged 1 commit into
6.xfrom
sweep-array-literals-tests
Jul 30, 2026
Merged

Use short array syntax in tests#255
harikt merged 1 commit into
6.xfrom
sweep-array-literals-tests

Conversation

@harikt

@harikt harikt commented Jul 30, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Refactor
    • Modernized test code to use PHP short array syntax consistently.
    • Updated query-building inputs, expected bind values, and test data providers across supported database drivers.
    • Preserved existing SQL expectations, assertions, and test behavior.

@harikt

harikt commented Jul 30, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review .

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 16b73c6a-2366-489f-a7d1-0eae20ffcd72

📥 Commits

Reviewing files that changed from the base of the PR and between 1865862 and dfdc144.

📒 Files selected for processing (20)
  • tests/AbstractQueryTest.php
  • tests/CollisionTest.php
  • tests/Common/DeleteTest.php
  • tests/Common/InsertTest.php
  • tests/Common/SelectTest.php
  • tests/Common/UpdateTest.php
  • tests/ExceptionTest.php
  • tests/Mysql/DeleteTest.php
  • tests/Mysql/InsertTest.php
  • tests/Mysql/SelectTest.php
  • tests/Mysql/UpdateTest.php
  • tests/Pgsql/DeleteTest.php
  • tests/Pgsql/InsertTest.php
  • tests/Pgsql/SelectTest.php
  • tests/Pgsql/UpdateTest.php
  • tests/QueryFactoryTest.php
  • tests/Sqlite/DeleteTest.php
  • tests/Sqlite/InsertTest.php
  • tests/Sqlite/UpdateTest.php
  • tests/Sqlsrv/SelectTest.php

📝 Walkthrough

Walkthrough

The pull request modernizes test code across common and database-specific query suites by replacing PHP array(...) literals with short [...] syntax. Assertions, query behavior, exceptions, SQL expectations, and test data remain unchanged.

Changes

Test array syntax modernization

Layer / File(s) Summary
Core bind and collision coverage
tests/AbstractQueryTest.php, tests/CollisionTest.php
Bind-value inputs, expected arrays, and collision-test fixtures use short array syntax without changing assertions or control flow.
Common query-builder coverage
tests/Common/*
Common delete, insert, select, and update tests use short arrays for query arguments, bind expectations, bulk rows, and providers.
Database-specific coverage
tests/Mysql/*, tests/Pgsql/*, tests/Sqlite/*, tests/Sqlsrv/*
Dialect-specific query inputs, conflict/returning arguments, expected binds, and provider datasets are converted to short arrays.
Exception and factory providers
tests/ExceptionTest.php, tests/QueryFactoryTest.php
Exception collections and query-factory provider tuples use short array syntax with unchanged contents.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 18.39% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: converting tests to short array syntax.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

@harikt: I’ll review the changes with the stated objective in mind.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@harikt
harikt merged commit b3d2c00 into 6.x Jul 30, 2026
20 checks passed
@harikt
harikt deleted the sweep-array-literals-tests branch July 30, 2026 10:37
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