Category: Unit Tests

Testing Frenzy – Can We BDD Test the Units?

I’ll be honest, I don’t do much testing. When it’s really necessary and I’m working on big enterprise projects, I do, but in general, my personal projects are usually one-man-army proofs of concept, or fixes on already tested apps. [author_more] We’ve done our share of testing posts here a...

Testing PHP Code with Atoum – an Alternative to PHPUnit

If you’ve been around PHP for more than a little while, you’ve no doubt started to test your code. And if you ask anyone in the PHP space what to use for writing unit tests, likely the first answer that they’ll give you is PHPUnit. It’s the de facto standard in the PHP community, and with good reason. But it’...

Testing Your Tests? Who Watches the Watchmen?

Regardless of whether you’re working for a big corporation, a startup, or just for yourself, unit testing is not only helpful, but often indispensable. We use unit tests to test our code, but what happens if our tests are wrong or incomplete? What can we use to test our tests? Who watches the watchmen? Enter [...

An Overview of PHPUnit 5 – What’s New? What’s Coming?

It was January 2016 when the PHPUnit development team announced the release of PHPUnit 5.0.While several minor version have already been released since, PHPUnit’s major version 5 has introduced several new functionalities and deprecated a few others. In this article, we’ll take a look at the most notable...

Clean Code Architecture and Test Driven Development in PHP

The Clean Code Architecture was introduced by Robert C. Martin on the 8light blog. The idea was to create an architecture which is independent of any external agency. Your business logic should not be coupled to a framework, a database, or to the web itself. With the independence, you have several advantages. For examp...

Promises in JavaScript Unit Tests: the Definitive Guide

Promises are becoming a common part of JavaScript code. The native Promise object is already supported by all the major browsers including Chrome, Firefox, and Safari. Despite making asynchronous code simpler, dealing with promises in unit tests is a hassle. You need to wire your test’s assertions into the callbacks ...