Skip to content

Add runtime API for preconditions and expected results - #79

Merged
formaceft-93 merged 1 commit into
mainfrom
feat/preconditions-expected-results
Nov 6, 2026
Merged

formaceft-93 merged 1 commit into
mainfrom
feat/preconditions-expected-results

Conversation

@formaceft-93

Copy link
Copy Markdown
Contributor

Add Allure::precondition(), Allure::preconditionHtml(), Allure::expectedResult(), and Allure::expectedResultHtml() to the shared PHP runtime API used by PHPUnit and Codeception.

Write the supplied strings unchanged as optional top-level fields in *-result.json, alongside description. Omit unset fields and preserve the explicitly supplied formats without converting Markdown to HTML. Calls within steps update the current test result.

This provides the fields consumed by allure-framework/allure3#1251, following the runtime APIs introduced in allure-framework/allure-js#1632 and allure-framework/allure-ruby#665.

@formaceft-93 formaceft-93 added type:new feature pr:new feature Pull requests that add new user-facing functionality. labels Nov 6, 2026
Comment thread README.md Outdated
}
```

## Preconditions and expected results

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preconditions and expected results are not that special compared to other APIs to deserve a special place in the README. Let's remove them. They should be documented at allurereport.org, though.

@formaceft-93
formaceft-93 force-pushed the feat/preconditions-expected-results branch from 00c5487 to 54ae924 Compare November 6, 2026 10:55
@formaceft-93
formaceft-93 merged commit 327dd62 into main Nov 6, 2026
22 checks passed
@formaceft-93
formaceft-93 deleted the feat/preconditions-expected-results branch November 6, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:new feature Pull requests that add new user-facing functionality. type:new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants