Skip to content

test: keep installer table skips before fixtures#1529

Merged
superdav42 merged 1 commit into
mainfrom
feature/auto-20260622-220147-gh1526
Jun 23, 2026
Merged

test: keep installer table skips before fixtures#1529
superdav42 merged 1 commit into
mainfrom
feature/auto-20260622-220147-gh1526

Conversation

@superdav42

@superdav42 superdav42 commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a shared skip_unless_tables_installed() helper for Default_Content_Installer_Test.
  • Keeps table-installation skips as the first executable statement in the product and checkout-form fixture tests before any wu_create_*() calls.

Resolves #1526

Testing

  • vendor/bin/phpunit --filter Default_Content_Installer_Test (passes: 42 tests, 117 assertions, 1 skipped; existing PHP deprecation notices emitted)
  • vendor/bin/phpcs tests/WP_Ultimo/Installers/Default_Content_Installer_Test.php (passes)

Summary by CodeRabbit

  • Tests

    • Refactored test suite to centralize table installation verification logic into a dedicated helper method, eliminating code duplication and improving consistency across test cases.
  • Refactor

    • Consolidated repeated inline verification checks across multiple tests into a single reusable utility method for better code clarity and maintainability.

@superdav42

Copy link
Copy Markdown
Collaborator Author

MERGE_SUMMARY

Summary:

  • Added a shared table-installation skip helper in tests/WP_Ultimo/Installers/Default_Content_Installer_Test.php.
  • The product and checkout-form fixture tests now call the skip helper as their first executable statement before fixture creation.

Testing:

  • vendor/bin/phpunit --filter Default_Content_Installer_Test (passes: 42 tests, 117 assertions, 1 skipped; existing PHP deprecation notices emitted)
  • vendor/bin/phpcs tests/WP_Ultimo/Installers/Default_Content_Installer_Test.php (passes)

Issue: Resolves #1526

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@superdav42, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 28 minutes and 7 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f26c977c-1d3f-4dff-ac7f-7ddd5d0d684f

📥 Commits

Reviewing files that changed from the base of the PR and between 29543f2 and f60b050.

📒 Files selected for processing (1)
  • tests/WP_Ultimo/Installers/Default_Content_Installer_Test.php
📝 Walkthrough

Walkthrough

In Default_Content_Installer_Test.php, a Table_Loader import is added and a new skip_unless_tables_installed() helper method is introduced. Two tests that previously contained an inline Table_Loader::get_instance()->is_installed() skip check now delegate to this shared helper.

Changes

Skip helper refactor in Default_Content_Installer_Test

Layer / File(s) Summary
skip_unless_tables_installed() helper and call sites
tests/WP_Ultimo/Installers/Default_Content_Installer_Test.php
Adds Table_Loader import, introduces skip_unless_tables_installed() helper method, and replaces the inline skip check in both done_creating_products and done_creating_checkout_forms tests with calls to the new helper.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • Ultimate-Multisite/ultimate-multisite#1525: Directly precedes this PR — originally added the inline Table_Loader::get_instance()->is_installed() skip checks in Default_Content_Installer_Test.php that this PR centralizes into the shared helper.

Suggested labels

review-feedback-scanned, status:available, origin:worker

Poem

🐇 Hoppity hop, I found a repeat,
Two skip checks that looked just the same.
I tucked them together, so tidy and neat,
One helper to handle the game.
Now the tables just call, and we neatly comply —
No duplication, no fuss, hip-hip-hi! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'test: keep installer table skips before fixtures' accurately describes the main change: repositioning table installation skip checks to execute before fixture creation.
Linked Issues check ✅ Passed The PR directly addresses issue #1526 by introducing a shared skip helper method and repositioning skip checks before fixture creation, exactly as required.
Out of Scope Changes check ✅ Passed All changes are contained within the Default_Content_Installer_Test.php file and focus on the consolidation and repositioning of table skip checks, staying within the defined scope.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/auto-20260622-220147-gh1526

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.

@superdav42 superdav42 force-pushed the feature/auto-20260622-220147-gh1526 branch from 29543f2 to f60b050 Compare June 23, 2026 04:08
@github-actions

Copy link
Copy Markdown

🔨 Build Complete - Ready for Testing!

📦 Download Build Artifact (Recommended)

Download the zip build, upload to WordPress and test:

🌐 Test in WordPress Playground (Very Experimental)

Click the link below to instantly test this PR in your browser - no installation needed!
Playground support for multisite is very limitied, hopefully it will get better in the future.

🚀 Launch in Playground

Login credentials: admin / password

@github-actions

Copy link
Copy Markdown

🔨 Build Complete - Ready for Testing!

📦 Download Build Artifact (Recommended)

Download the zip build, upload to WordPress and test:

🌐 Test in WordPress Playground (Very Experimental)

Click the link below to instantly test this PR in your browser - no installation needed!
Playground support for multisite is very limitied, hopefully it will get better in the future.

🚀 Launch in Playground

Login credentials: admin / password

@superdav42 superdav42 merged commit 02ce3a0 into main Jun 23, 2026
11 checks passed
@superdav42

Copy link
Copy Markdown
Collaborator Author

Summary

  • Adds a shared skip_unless_tables_installed() helper for Default_Content_Installer_Test.
  • Keeps table-installation skips as the first executable statement in the product and checkout-form fixture tests before any wu_create_*() calls.

Testing

  • vendor/bin/phpunit --filter Default_Content_Installer_Test (passes: 42 tests, 117 assertions, 1 skipped; existing PHP deprecation notices emitted)
  • vendor/bin/phpcs tests/WP_Ultimo/Installers/Default_Content_Installer_Test.php (passes)

Merged via PR #1529 to main.
Merged by deterministic merge pass (pulse-wrapper.sh).


aidevops.sh v3.22.0 spent 13m on this as a headless bash routine.

@superdav42 superdav42 added the review-feedback-scanned Merged PR already scanned for quality feedback label Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-feedback-scanned Merged PR already scanned for quality feedback

Projects

None yet

Development

Successfully merging this pull request may close these issues.

quality-debt: PR #1525 review feedback (medium)

1 participant