سؤال

Is there any examples of using PHP unit tests with WordPress themes, seems a lot of blogs out there on the subject are out dated as the core unit tests are apart of trac, yet last night - I pulled trac and tried to set up a sample theme to run tests on. It doesn't quiet work, you have to run all the tests to test your theme and even if you try and require a file - it tries to require it before WordPress is instantiated and it becomes a giant mess.

Any ways, I know there's the plugin for theme unit testing - but that just installs a ton of posts that "try" and break your theme - doesn't test the underlying logic - especially if building a framework - php unit is best here as you can test out all the different options and implementations of your code.

So is there any way to run PHPunit inside a theme?

لا يوجد حل صحيح

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى wordpress.stackexchange
scroll top