Skip to content

test(server-config): cover saving the Solid server settings - #14

Merged
roncodes merged 1 commit into
release/v0.1.0from
test/server-config-coverage
Nov 17, 2026
Merged

roncodes merged 1 commit into
release/v0.1.0from
test/server-config-coverage

Conversation

@roncodes

Copy link
Copy Markdown
Member

codecov/patch fails on #13: 0.00% of the diff hit against an auto target of 26.49%. The release's only source change is in SolidController::saveServerConfig, where $request->array('server') became $request->inputArray('server'). No test runs any controller in this package.

This adds two tests for saveServerConfig:

  • the request's server values are merged over config('solid.server') and stored as the system.solid.server setting;
  • a request without them stores the defaults.

They run against in-memory SQLite and core-api's real inputArray() macro.

The package's dev install has the illuminate/* components core-api needs, but not laravel/framework. So core-api's base controller, FormRequest, config() and response() can't load in tests. The test defines guarded stand-ins for them, used only when the real ones are missing.

Locally, all 110 tests pass and php-cs-fixer is clean.

The v0.1.0 release changes saveServerConfig to read the request with
core-api's inputArray(), and Codecov's patch check failed with that line
uncovered. The test saves settings over the defaults into SQLite.

This package's dev install has no laravel/framework, so the test supplies
guarded stand-ins for the Foundation traits, FormRequest, config() and
response().
@codecov

codecov Bot commented Nov 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 26.84%. Comparing base (70560de) to head (b993132).

Additional details and impacted files
@@                 Coverage Diff                  @@
##             release/v0.1.0      #14      +/-   ##
====================================================
+ Coverage             26.49%   26.84%   +0.35%     
  Complexity              643      643              
====================================================
  Files                    19       19              
  Lines                  2265     2265              
====================================================
+ Hits                    600      608       +8     
+ Misses                 1665     1657       -8     
Flag Coverage Δ
backend 26.84% <ø> (+0.35%) ⬆️

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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@roncodes
roncodes merged commit 326bfd2 into release/v0.1.0 Nov 17, 2026
7 checks passed
@roncodes
roncodes deleted the test/server-config-coverage branch November 17, 2026 06:48
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