Conversation
danharrin
left a comment
There was a problem hiding this comment.
Can we have some snapshot tests for the different options please?
|
Do you want it tested against the renderer output or the content in the editor in the browser? |
|
Not sure what you mean? Tested against the output of the PHP function, no need for a browser test |
|
Maybe I'm just not clear on what you mean by "snapshot" test. I'm my mind snapshot implies browser. But as long as the RichContentRender outputs the correct html or json/array I think that satisfies the test. Am I wrong? |
|
It's not a screenshot, it stores text: https://pestphp.com/docs/snapshot-testing |
|
I'm not sure snapshot testing is going to work with this since each time the faker is called it would be different text, like in paragraphs which are using the $faker->paragraphs(). Wouldn't that cause the snapshot to fail every time? |
|
Yeah thats true, I think we still need some sort of test |
|
You can seed faker so that it always creates the same fake data @awcodes |
Description
Adds a
RichContentFakerclass to allow for easier population of rich editor content in factories and tests.Functional changes
composer cscommand.