One of the things that I've been making much more concerted effort, likely more is managing separation of concerns between the classes responsible for interfacing with WordPress and those responsible for working with the problem domain.. There are two areas of responsibility here the area responsible for generally solving the problem, the area responsible for interfacing with WordPress... You can make the case that it's important to unit test areas that communicate with WordPress, and I also know these are tried and APIs that have their own set of tests.. Instead, it's more about way to lay out project when portion of it will be interfacing with WordPress... Instead, I'm interested in talking about organizing files at the filesystem level and the namespace level, say, focusing our unit tests on areas that are most critical.. That is, then I know I can find the meta box files in directory nested with WordPress directory then within Admin subdirectory followed by MetaBox directory... To that end, code for them in manner. Given what we know about meta boxes, we know we'll need the following abstract class that defines the post type to. That is, within our WordPress directory, we'd have Admin subdirectory and we'd have the View subdirectory that would contain the file responsible for displaying the information.. This gives you the ability to focus on writing tests for your problem space all the while making sure you're writing scalable, maintainable, and WordPress-based code..
Read more