Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test platform #509

Open
maraf opened this issue Jul 1, 2023 · 0 comments
Open

Test platform #509

maraf opened this issue Jul 1, 2023 · 0 comments

Comments

@maraf
Copy link
Member

maraf commented Jul 1, 2023

Provide basic infrastructure for testing template parser and tag libraries.

  • Custom module in this repo
    • Headless (from command line) or hosted on http server
    • Have db snapshot that it always imports before starting the tests
      • Use admin to create custom entities etc
      • For tests changing db state, always restore after test?
  • Tag library for test definitions
  • Tag library for asserting outputs
    • Assert property values
    • Assert generated output
      • Trim leading/trailing whitespaces
<test:group name="libraries">
    <test:group name="variable">
        <test:case name="set">
            <php:set property="var:x" value="1" />

            <assert:equals expected="1" actual="var:x" />
        </test:case>
    </test:group>
</test:group>
@maraf maraf pinned this issue Jul 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant