Highly Opinionated Thoughts on Programming

by Elnur Abdurrakhimov

Rebooting Servers One-by-One With Ansible

May 20, 2014

If you have several nodes, you want to reboot them one by one so that online nodes can still do their jobs. Here’s a playbook that shows one way of doing that in Ansible:

Using Environment Variables to Add Flexibility to PHPUnit Tests

May 20, 2014

If you’re using PHPUnit for running not only unit but UI tests too, you might want to be able to run them against different browsers. There are several ways of doing that, some of which involve hardcoding some stuff in your phpunit.xml or having multiple phpunit.xx.yml files or, worse, hardcoding it in the tests themselves.

Symfony: Simplifying Password Encoding by Creating a Password Encoder Right in the DIC

May 13, 2014

Let’s say you have a UserManager class that controls the application rules pertaining to the User class. One of those rules is to encode a user’s password if her plain password is set. Here’s a test that would test that:

Separating Different Types of Tests in Gradle

May 11, 2014

Let’s say you have a Gradle application with a standard layout:

Triangulation in Testing

May 9, 2014

One of the rules of TDD is to write as less code as possible to make a test pass. That means that you can actually hardcode results instead of writing real code to make a test pass.

© Elnur Abdurrakhimov