DEV Community

Discussion on: Unit Testing Classes That Call Functions From WordPress Core

Collapse
 
thinkverse profile image
Kim Hallberg • Edited

In ContentFilters#callback shouldn't the second argument passed to sprintf() be $this->cta and not the $content. As it is now the output would be Before<p>Before</p> and would result in a failing test. 🙂

Did a quick test in Laravel Playground just to check.
laravelplayground.com/#/snippets/e...

Collapse
 
shelob9 profile image
Josh Pollock • Edited

Yes. I used the wrong variable there. I edited the example. Thank you.