Category: Testing

Angular Testing: A Developer’s Introduction

In this guide, we’ll look at how we can write automated tests in Angular 5 projects. Angular Testing is a core feature available in every project that was set up with either the Angular CLI or the Angular quick start project. The subject of Angular testing is vast, as it’s a complex and very involved topic. It woul...

A Guide to Testing React Components

React is a framework that has made headway within the JavaScript developer community. React has a powerful composition framework for designing components. React components are bits of reusable code you can wield in your web application. React components are not tightly coupled from the DOM, but how easy are they to uni...

Re-Introducing PHPUnit – Getting Started with TDD in PHP

There are a lot of PHPUnit posts on our site already (just check the tag), but it’s been a while since we’ve actually introduced people to it, and the tool has evolved significantly since then. This article aims to re-introduce the tool in a modern way, to a modern audience, in a modern PHP environment R...

How to Write JavaScript-Style Test Watchers in PHP

I didn’t start out writing tests for my code. Like many before and since, my “testing” was to write code and refresh the page. “Does it look right?”, I’d ask myself. If I thought so, I’d move on. In fact, most of the jobs I’ve had have been with companies who don’t ...

8 Must Have PHP Quality Assurance Tools

For shipping quality code, we must have testing in mind while coding (if not doing TDD). However, with the wide range of PHP testing tools out there, it’s hard to make a choice! Exploring PHP is a fun adventure (premium course on that here!) but it’s hard to assemble a toolbelt that’s not too heavy to...

Poka Yoke – Saving Projects with Hyper-Defensive Programming

When working in a medium to large team on the same codebase, it can sometimes become hard to understand each other’s code and how to use it. Various solutions exist to help with this. For example, you can agree to follow a set of coding standards to make the code more readable for each other, or use a framework t...

BDD in JavaScript: Getting Started with Cucumber and Gherkin

By now, everyone has heard about Test Driven Development (TDD), and the benefits that this can have on your product and your development lifecycle. It’s a no-brainer really. Every time you write a test for a piece of code, you know that code works. And, what’s more, you will know in the future if that code...

What Is Snapshot Testing, and Is It Viable in PHP?

Ah-ha moments are beautiful and rare in programming. Every so often, we’re fortunate enough to discover some trick or facet of a system that forever changes how we think of it. For me, that’s what snapshot testing is. You probably write a lot of PHP code, but today I want to talk about something I learned ...

Family CRMs, Guzzle Wrappers and PHP Machine Learning? Sourcehunt!

If you’re new to Sourcehunt, it’s our monthly post for promoting open source projects that seem interesting or promising and could use help in terms of Github stars or pull requests. It’s our way of giving back – promoting projects that we use (or could use) so that they gain enough exposure to ...

Functional Programming with Phunkie: Building a PHP JSON Parser

Phunkie is a library with functional structures for PHP. In this two-part tutorial, Phunkie’s creator Marcello Duarte, head of training at Inviqa, explains how to create Parser combinators using the functional library. This post first appeared on the Inviqa blog, and was republished here with their permission. For an...