#testing

Minitest Custom Assertions

Published at November 19, 2020 ·  4 min read

Since I discovered the world of testing and TDD I’ve loved the philosophy behind it and the safety net that it brings. My first interaction with testing was with Ruby on Rails specifically with RSpec, but I’ll admit it, understanding and getting used to testing is not easy but RSpec did a very good job at making it easier and in combination with shoulda matchers makes tests wonderfully easy to read....


Unit Testing with phpunit

Published at June 9, 2020 ·  4 min read

In this post I’m going to explain and walk you through how to write unit tests with PHP using phpunit. First step is to add php unit as a requirement in your composer.json file. You can do that by running the following command. composer require --dev phpunit/phpunit Let’s also go ahead and add an autoload entry to the composer file to make things easier, this is what the composer file should look like....