Repository navigation
test: record sandbox fixtures for every resource, map the fields they revealed - #78
Merged
Merged
Conversation
… 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.phptherefore records sub-resources from these sample records (SEED_PARENTS) instead of the first list entry. It also anonymizesclient_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:
openAmountafter a partial payment, asMoneypaymentTypesround trip, PDF header, reminder itemsnextCreationDate, incomingopenAmountDrift the new fixtures revealed
ArticleandIncomingget$propertyValues. Billomat embedsarticle-property-valuesandincoming-property-values, as it does for clients and suppliers.CountryTaxgets$created,$updatedand$customfield.ContractFixturesTestcounted tag lists undertag, 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