All Posts

Resolving Changelog Merge Conflict Madness

We start with an innocent looking changelog. --- title: Changelog status: ready # draft, ready --- All notable changes to this project will be documented in this file.<br> The format is based on [Keep a Changelog](http://keepachangelog.com) ## [2.0.0] - Unreleased ### Added - _Component [footer]({{ componentPath '@footer' }})_: Added copyright to the footer ### Changed - _Component [accordion]({{ componentPath '@accordion' }})_: Replaced title divs with header elements - _Component [textarea]({{ componentPath '@textarea' }})_: Label font made bold ### Removed - _Component [sidenav]({{ componentPath '@sidenav' }})_: removed class `my-class-1` from `ul` element ## [1.

Acceptance Testing A Service With Behat And Mink Sessions

Running automated acceptance tests are an excellent way to verify your application does exactly what it is intended to do. Each time you make changes to your application, your previous tests will always be there to give assurance that new functionality does not break anything. In this post we’ll look at how we can use Mink and Behat to simulate the interaction between a browser session and a simple service api.

Why Couscous Is Good For Documentation

Why Couscous Is Good For Documentation

Writing documentation can seem like a chore, or even an afterthought. Yet we know that it’s important so that others can use or maintain our code in future. That’s where Couscous comes in. Couscous is a static website generator for your documentation. It takes your markdown files and then converts them to HTML, allowing you to quickly serve up your documentation in a readable format. You can even deploy directly to GitHub pages.

Testing Time

Sometimes when unit testing PHP code, we run into things that are difficult to mock. This post will introduce how you can mock built-in php functions such as time() and mt_rand(). Mocking time() Let’s take the below example: namespace Example\Namespace; function displayGreeting() { $time = time(); $hour = date("g", $time); $meridiem = date("A", $time); if ($meridiem == "AM") { return 'Good Morning'; } if ($hour <= 6 || $hour == 12) { return 'Good Afternoon'; } return 'Good Evening'; } In order to fully test our display greeting function we need to be able to manipulate the time element, without having to change any system settings.