tempest-framework
tempest-framework copied to clipboard
test(view): add test that attribute dashes are preserved
I often use data attributes for doing styling, and inertia for example requires a data-page="bunchofjsondata to work, right now that doesn't seem to work :( (my guess is there is someplace where it is camelCased).
So this PR adds a (failing) test for that :)
Hey @NeoIsRecursive! Thanks for the PR. It looks like CI is failing for another reason (which I will look into). Do you mind posting the output of composer phpunit from your local machine so we can review?
Hey @NeoIsRecursive! Thanks for the PR. It looks like CI is failing for another reason (which I will look into). Do you mind posting the output of
composer phpunitfrom your local machine so we can review?
Yes of course! I also created an issue (#583)
PHPUnit output:
There was 1 failure:
1) Tests\Tempest\Integration\View\ViewTest::test_render_element_with_attribute_with_dash
Failed asserting that '<div dataTheme="tempest"></div>' [ASCII](length: 31) contains "<div data-theme="tempest"></div>" [ASCII](length: 32).
Thanks for the test! I copied it manually to a new branch so that I could immediately make a fix for it. So I'm sorry I'm closing the PR and you're not getting attributed for the contribution, but I do appreciate it! 😁
https://github.com/tempestphp/tempest-framework/pull/585