Author Archives: Martin Mapes

How to Unit Test a CakePHP Console (Shell) Command — An Example

Wow, it sure took me a long time to find an example of how to write a unit test for my CakePHP console (shell) commands. There’s no how-to in the CakePHP documentation, and the only blog post I could find … Continue reading

Posted in CakePHP, Testing | Leave a comment

Why Doesn’t XDebug Work? It Used To.

I found myself asking (again) why XDebug wasn’t working, after installing a new IDE. I’d set a breakpoint, debug the page, but never see the code stop. I had trouble getting it to run the last time I tried a … Continue reading

Posted in Debugging, PHP | Tagged , , , , | 2 Comments

What’s the deal with wp_enqueue_style (and why does WP documentation suck?)

I’m implementing a child theme for the WordPress template twentyfourteen. I followed the simple directions at WordPress’ Child Themes page. Yet my styles were not showing up. Not only were they not overriding the parent styles, Firebug showed that they … Continue reading

Posted in CSS, Webmastering, WordPress | Leave a comment

Simpler than WordPress — or is it?

“Hey, Mart, can you post the latest newsletter to my web site? By the way is that something I can do easily?” I have many clients for whom I’ve built web sites. I usually try to let them make updates … Continue reading

Posted in Uncategorized | Leave a comment

Hey WordPress, where did you hide the logout button?

Just posted on my completely standard WordPress blog. I did not customize the admin interface, this is just exactly as it comes, out of the box. Now where in the hell is the logout button? Here’s where I’ve looked so … Continue reading

Posted in Uncategorized | 2 Comments

Ical and Daylight Savings time in PHP

The film festival I volunteer for is usually in February, but this year it takes place during the same weekend as the switch to Daylight Savings time. Years ago I built a link on each detail page that lets you … Continue reading

Posted in Debugging, PHP, Web programming | Leave a comment

function dry(){echo “Do not repeat yourself”;} dry(); dry(); dry();

Jumpy Thumbnails It was a snowy Saturday morning and I didn’t have a lot of pressing matters, so I decided to track down a silly issue, off the clock, for a client of mine. On two similar pages, the space … Continue reading

Posted in Refactoring, Web programming | Leave a comment