Skip to content

test(sandbox): cover the default application base path - #344

Merged
roncodes merged 1 commit into
release/v2.0.4from
fix/sandbox-base-path-coverage
Nov 19, 2026
Merged

roncodes merged 1 commit into
release/v2.0.4from
fix/sandbox-base-path-coverage

Conversation

@roncodes

Copy link
Copy Markdown
Member

Fixes the red build check on #343.

The coverage gate requires 100%. It failed with MigrateSandbox.php at 39/40, because every test from #342 overrides applicationBasePath(), so its default return base_path(); never ran.

  • Fix: the probe now calls the real method, through a namespaced base_path shim. This is the same pattern the file already uses for Fleetbase\Support. No production code changes.
  • Tests: vendor/bin/pest tests/Unit/Console passes (112). php-cs-fixer reports nothing to fix in the touched files.

The coverage gate failed on release/v2.0.4 because every MigrateSandbox test
overrode applicationBasePath(). Probe it through a namespaced base_path shim,
as the file already does for Fleetbase\Support.
@roncodes
roncodes merged commit 730e3c2 into release/v2.0.4 Nov 19, 2026
3 checks passed
@roncodes
roncodes deleted the fix/sandbox-base-path-coverage branch November 19, 2026 10:36
@codecov

codecov Bot commented Nov 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (release/v2.0.4@d1dfa70). Learn more about missing BASE report.

Additional details and impacted files
@@                Coverage Diff                 @@
##             release/v2.0.4      #344   +/-   ##
==================================================
  Coverage                  ?   100.00%           
  Complexity                ?      9964           
==================================================
  Files                     ?       532           
  Lines                     ?     30374           
  Branches                  ?         0           
==================================================
  Hits                      ?     30374           
  Misses                    ?         0           
  Partials                  ?         0           
Flag Coverage Δ
backend 100.00% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.

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