Skip to content

test: record sandbox fixtures for every resource, map the fields they revealed - #78

Merged
justpilot merged 2 commits into
4.xfrom
test/sandbox-sample-fixtures
Oct 26, 2026
Merged

justpilot merged 2 commits into
4.xfrom
test/sandbox-sample-fixtures

Conversation

@justpilot

Copy link
Copy Markdown
Owner

Sandbox sample data

Created fictional records named SDK-Beispiel … in the sandbox: client, contact, supplier, article, invoice (completed, partial payment, reminder), offer (completed), confirmation, delivery note, credit note (completed and paid), letter, recurring (action=CREATE, start in 10 years), incoming with payment, tags, comments, property values, inbox document, unit, reminder text, tax-free country.

The sandbox also holds real-looking client data. tools/record-fixtures.php therefore records sub-resources from these sample records (SEED_PARENTS) instead of the first list entry. It also anonymizes client_number, which carried a patient number in the committed fixtures.

While seeding, 18 behaviour checks ran against the sandbox and all matched what the SDK expects:

  • status after create, complete and payment (invoice DRAFT → OVERDUE, credit note → PAID, offer → OPEN, reminder DRAFT)
  • totals and openAmount after a partial payment, as Money
  • paymentTypes round trip, PDF header, reminder items
  • recurring nextCreationDate, incoming openAmount

Drift the new fixtures revealed

  • Article and Incoming get $propertyValues. Billomat embeds article-property-values and incoming-property-values, as it does for clients and suppliers.
  • CountryTax gets $created, $updated and $customfield.
  • ContractFixturesTest counted tag lists under tag, but Billomat uses <resource>-tag (the SDK already did). Tag lists were never actually compared.

Docs

The JSON examples now include responses for contacts, articles, offers, credit notes, letters, reminders, recurrings, incomings, inbox documents, tags, units, reminder texts and tax-free countries.

Test plan

  • composer test (3,743 tests), contract tests (119 cases), PHPStan, lint, Rector, generate:check, docs:json:check, docs build
  • Integration suite against the sandbox: 107 tests, 5 opt-in tests skipped. The reminder items test now runs.

… revealed

- Fictional sample records ("SDK-Beispiel ...") in the sandbox; the recorder
  takes sub-resources from them instead of the first list entry, so nothing is
  attached to real records. Client numbers are anonymized too.
- 37 new fixtures (offers, credit notes, letters, reminders, recurrings,
  incomings, articles, contacts, tags, property values, units, reminder texts,
  country taxes, ...); the contract test now covers them.
- Fixed: Article/Incoming::$propertyValues and CountryTax created/updated/
  customfield were unmapped. The contract test used the wrong envelope key for
  tag lists and never compared them.
- JSON examples on 14 more doc pages.
@justpilot
justpilot merged commit 3e7c071 into 4.x Oct 26, 2026
8 of 9 checks passed
@justpilot
justpilot deleted the test/sandbox-sample-fixtures branch October 26, 2026 16:14
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