Skip to content

Comments

Increased test coverage for Acquia env settings.#2298

Merged
AlexSkrypnyk merged 1 commit intomainfrom
feature/increase-settings-coverage
Feb 17, 2026
Merged

Increased test coverage for Acquia env settings.#2298
AlexSkrypnyk merged 1 commit intomainfrom
feature/increase-settings-coverage

Conversation

@AlexSkrypnyk
Copy link
Member

@AlexSkrypnyk AlexSkrypnyk commented Feb 17, 2026

Summary by CodeRabbit

  • Tests
    • Enhanced test coverage with additional validation for configuration path fallback behavior
    • Improved test infrastructure to support flexible configuration initialization

@coderabbitai
Copy link

coderabbitai bot commented Feb 17, 2026

No actionable comments were generated in the recent review. 🎉


Walkthrough

Added a new test method to verify config directory fallback behavior when DRUPAL_CONFIG_PATH is absent, and extended the test utility method requireSettingsFile to accept optional pre-configured settings for test initialization.

Changes

Cohort / File(s) Summary
Test Method Addition
tests/phpunit/Drupal/EnvironmentSettingsTest.php
Added testEnvironmentAcquiaConfigVcsDirectoryFallback() test method to verify that config_sync_directory falls back to config_vcs_directory when AH_SITE_ENVIRONMENT is set and DRUPAL_CONFIG_PATH is absent.
Test Utility Enhancement
tests/phpunit/Drupal/SettingsTestCase.php
Updated requireSettingsFile() method signature to accept optional array $pre_settings parameter, enabling pre-seeded settings initialization. Added RuntimeException check for missing application root directory.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

🐰 A hop through the config, we test every way,
When paths fall back gracefully, all systems obey,
With settings pre-seeded, the tests shine so bright,
Vortex spins onward—your Drupal done right!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main change: adding a new test method to increase test coverage for Acquia environment settings fallback behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/increase-settings-coverage

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

@AlexSkrypnyk
Copy link
Member Author

Code Coverage Report:
  2026-02-17 07:33:01

 Summary:
  Classes:  0.00% (0/1)
  Methods:  0.00% (0/2)
  Lines:   94.65% (177/187)

@github-actions
Copy link

Code Coverage Report:
  2026-02-17 07:33:40

 Summary:
  Classes:  0.00% (0/1)
  Methods:  0.00% (0/2)
  Lines:   94.65% (177/187)

@AlexSkrypnyk
Copy link
Member Author

Code Coverage Report:
  2026-02-17 07:36:50

 Summary:
  Classes:  0.00% (0/1)
  Methods:  0.00% (0/2)
  Lines:   94.65% (177/187)

@AlexSkrypnyk
Copy link
Member Author

Code Coverage Report:
  2026-02-17 07:36:55

 Summary:
  Classes:  0.00% (0/1)
  Methods:  0.00% (0/2)
  Lines:   94.65% (177/187)

@codecov
Copy link

codecov bot commented Feb 17, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 77.12%. Comparing base (f1d3e92) to head (0bb7bf2).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...baseline/tests/phpunit/Drupal/SettingsTestCase.php 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2298      +/-   ##
==========================================
- Coverage   77.69%   77.12%   -0.58%     
==========================================
  Files         117      110       -7     
  Lines        6174     6015     -159     
  Branches       44        0      -44     
==========================================
- Hits         4797     4639     -158     
+ Misses       1377     1376       -1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@AlexSkrypnyk AlexSkrypnyk merged commit 4802c03 into main Feb 17, 2026
27 of 28 checks passed
@AlexSkrypnyk AlexSkrypnyk deleted the feature/increase-settings-coverage branch February 17, 2026 07:56
@github-project-automation github-project-automation bot moved this from BACKLOG to Release queue in Vortex Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Release queue

Development

Successfully merging this pull request may close these issues.

1 participant