How To Setup A WordPress Development Environment

WordPressI code on a MacBook where there are many ways to set up your local WordPress development environment. I’ve used really simple solutions like MAMP as well as really robust and setups like Vagrant with VVV. I have recently enjoyed the simplicity of this new setup using Homebrew to install a LAMP stack that, once setup, you never have to touch again to create new development sites. The key is dynamic virtual hosts!

Continue reading

How To Use StepObjects in Cest Classes

CodeceptionI encourage you to look at Codeception for writing automated tests for your PHP apps. Codeception has support for unit tests like you’d write with PHPUnit. In fact, Codeception uses PHPUnit under the hood to run unit tests. Codeception also has support for functional and acceptance tests. Here is a tip that took me over an hour of reading the Codeception source code to figure out. Hopefully this will save you some time if you want to use StepObjects in your Cest files.

Continue reading

Unit Testing WordPress Plugins

 

WordPressIf you are developing a WordPress plugin, t is a very good idea to write some automated tests for it. Pound is a light weight WordPress plugin that has makes it easy to get started with testing. The main point was to help plugin developers test more easily and more frequently. This is an overview and tutorial for using Pound to unit testing WordPress plugins.

Continue reading

Sublime Text 2 Commands For Mac

sublime-text-logoSublime Text 2 is a really nice text editor with a lot of power behind it. It also has a “Vintage” mode for folks who fancy vim, such as myself. I also happen to enjoy exploring new software, especially text editors, and Sublime Text 2 is my current favorite text editor. The only majorly annoying thing about Sublime Text 2 is the way it handles word wrapping. Periods (.) can sometimes wrap to the next line making it look like you have a mistake in your writing. This is only a problem when writing paragraphs, like in Markdown for blog posts.
Continue reading

Run PHP Script in Vim

Vim IconWhen developing PHP apps I often want to run the current file and see the results. Sometimes I even want to save those results, or perhaps manipulate the results. So I wrote this little vim function to run my currently open PHP file and place the results in a new VIm buffer.

Continue reading