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

bleedingdeacons / confur / 30692690479
95%

Build:
DEFAULT BRANCH: main
Ran 01 Aug 2026 08:55AM UTC
Jobs 1
Files 16
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

01 Aug 2026 08:54AM UTC coverage: 90.884%. Remained the same
30692690479

push

github

web-flow
Take WordPress stand-ins from wp-mocks (#38)

* test: take WordPress stand-ins from wp-mocks

Three files and 872 lines of hand-rolled WordPress go: tests/bootstrap.php's
"smart WordPress detection", tests/confur-test-harness.php, and
tests/wordpress-functions.php.

The detection went with them. The bootstrap branched on whether a real
WordPress was loaded and only stubbed when it was not; that branch was dead —
the unit suite never runs inside WordPress — and it made the stubs' behaviour
depend on the environment, which is the opposite of what a unit suite wants.

tests/wordpress-functions.php defined Confur\Shortcodes\get_field() and
friends purely to forward to the global ones. PHP already falls back to the
global namespace for an unqualified call, so they were doing nothing.

The tests keep the shape they were written in. The old harness kept ACF
values, titles and statuses keyed per post; WpState keys fields flat and holds
the other two on the post. Rather than flatten a hundred and thirty call
sites, tests/FieldStore.php, TitleStore.php and StatusStore.php are ArrayAccess
views that do the conversion, so $this->fields[42] = [...] still reads as it did.

Five things worth knowing, each a real difference rather than a rename:

  - ConfurJsonResponse extended \Error deliberately, and it was right to. The
    handler wraps its work in catch (\Exception), so an Exception-based
    stand-in for wp_send_json_success() gets swallowed and the handler carries
    on into its error path — the test then asserting against a failure the
    real code never reaches. Fixed in the package (wp-mocks#11, v1.5.0) rather
    than worked around here.

  - get_field() and get_fields() read *separate* stores in the old harness
    (confur_fields and confur_allfields). Real ACF has one, and so does
    WpState, so the tests that seeded both now use addFields() to merge
    instead of replacing.

  - url_to_postid() was stubbed in setUp and overridden per test. Brain Mon... (continued)

977 of 1075 relevant lines covered (90.88%)

2.3 hits per line

Jobs
ID Job ID Ran Files Coverage
1 30692690479.1 01 Aug 2026 08:55AM UTC 16
90.88
GitHub Action Run
Source Files on build 30692690479
  • Tree
  • List 16
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30692690479
  • b03862a4 on github
  • Prev Build on main (#30568047366)
  • Next Build on main (#30696041018)
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