• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

bleedingdeacons / sentinel / 30055179211
91%

Build:
DEFAULT BRANCH: main
Ran 24 Jul 2026 12:06AM UTC
Jobs 1
Files 8
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Jul 2026 12:06AM UTC coverage: 81.3% (+74.9%) from 6.429%
30055179211

push

github

web-flow
Raise test coverage from 6% to 83% (#15)

Sentinel was effectively untested: the four Admin classes are 82% of the
codebase and sat at 0%, so the only route to meaningful coverage was to
test them properly. No production code is changed — tests only.

Rather than mock WordPress away, the harness now stands up enough of it
that the real logic runs:

  - ABSPATH and WP_PLUGIN_DIR point at real temp directories, so the
    wp-config.php rewriter (regex replace, marker insertion, atomic
    rename) and the plugin-status reader (installed/version/build-date
    from readme.txt) are exercised against actual files.
  - The $wpdb double is scriptable, so LogViewerPage's populated-table
    path is covered rather than only its empty state.
  - A minimal wp-admin/includes/upgrade.php stub satisfies the hard
    require in Sentinel_Logger::createTable().

New AdminTestCase centralises the WordPress surface these pages touch;
wp_die() and wp_send_json_*() throw so terminating paths are assertable.

Two base-class fixes were needed because WP_Mock resolves the first
matching expectation, which meant a per-test stub could never override
the one registered in setUp(): get_option and current_user_can now route
through seedable state (setOption(), denyCapability()).

Deliberately left uncovered: LogViewerPage::handleClearAction()'s success
path ends in exit() and would kill the runner, and the runtime-state
readers key off defined('UNITY_KILL'), which would leak across tests.

163 tests, 294 assertions. PHPStan clean.

1526 of 1877 relevant lines covered (81.3%)

3.53 hits per line

Jobs
ID Job ID Ran Files Coverage
1 30055179211.1 24 Jul 2026 12:06AM UTC 8
81.3
GitHub Action Run
Source Files on build 30055179211
  • Tree
  • List 8
  • Changed 8
  • Source Changed 0
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30055179211
  • 33619638 on github
  • Prev Build on main (#29915933382)
  • Next Build on main (#30470902232)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc