Blog > Category > Testing

December 21, 2016

Mocking Swift Mailer -- 3 Steps to better code

A few days ago an issue came across my Jira queue that mentioned odd characters showing up in the subject line of our notification system. We use SwiftMailer library which is a fantastic library for sending mail. The bug report included text similar to: Something was taking our twig template that we use for our email subject and changing the encoding. This is normally done when you want to...

PHP Testing

Read

August 31, 2016

Solidify Fragile Tests

On my first week at the new job I was tasked to fix some tests that were logging data. While the fix was simple enough, by using `Psr\Log\NullLogger as Logger` instead of `Monolog\Logger` in the test, during the process I ran into another test that appeared quite fragile. Fragile test: Our `getFood()` method returns an array of all foods by type. Given that, we would expect to see types, such as...

PHP Testing

Read

June 10, 2016

php[tek] 2016 in St. Louis was a blast!

This year php[tek] was in St. Louis, an easy four and a half hour drive from Memphis. Since I didn’t have to fly to the conference I stocked up on a lot of local Memphis beer to share with my fellow PHP beer connoisseurs. Originally, my awesome wife Kara was going to join me, however, it didn’t work out. Because I was giving a day long Laravel training on Monday and wanted some time...

Community Conferences Speaking Testing

Read

February 6, 2016

Acceptance and Functional Testing with Codeception -- SunshinePHP 2016

Feedback via Twitter SunshinePHP 2016 was the second time I formally gave my Acceptance & Functional Testing with Codeception talk. I had built the talk from a handful of demo sessions at my local user group: MemphisPHP.org. The first time I gave the talk was at DevSpaceConf in October 2015. I only had two attendees show up to the talk which turned out to be really awesome. I...

Conferences PHP Speaking Testing

Read

August 6, 2015

Upload Test Artifacts From Travis-CI to Amazon AWS S3

I’ve spent a lot of time the past few days trying to get test artifacts to upload to Amazon's AWS S3. I’ve also spent a lot of time correcting typos from "artifcats" to "artifacts". I’m not sure what an "artifcat" is, but I know what a test artifact is. A test artifact is some file that is created during a test. In my specific case it's the _output...

Laravel Testing

Read

July 29, 2014

TeamCity + Codeception + Laravel = Automated build testing

I’m going to start out by saying this: I’m probably not doing this the "right" way. I’ve not been able to find anything that really pushes me into the "right" way so I’m documenting what I currently have working in hopes that someone will come along and show me a better way. The project I’m working with is for my day job and covered by some signed...

Laravel PHP Testing

Read