cakephp / twig-view

Twig View for CakePHP
MIT License
13 stars 7 forks source link

Add test showing usage of "do" tag. #18

Closed ADmad closed 4 years ago

ADmad commented 4 years ago

Using "do" allows calling functions without printing any output hence TwigView::__toString() is not needed. Also closes #4.

othercorey commented 4 years ago

I like this, but I think I want to split it into a separate unit test so the simple tests don't look so weird.

ADmad commented 4 years ago

I created separate files for the do tests but now the TreeScanner tests fails. I tried updating the excepted values as per the error shown but it then generates some other mismatch.

Those scanner tests should use a virtual filesystem (as done in some core filesystem tests). It would be annoying to have to update the scanner tests every time new templates files are added.

othercorey commented 4 years ago

Yea the scanner tests are annoying.