Skip to content

the-engineering-coach/019-unittest-isolation-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unit Test Isolation with PHP

This repository contains all the code for The Engineering Coach YouTube video, "Unit Test Isolation: How to Master External Dependencies (PHP)".

In this video, we dive into the crucial practice of unit test isolation. This project demonstrates why it's so important to isolate your tests from external dependencies, such as databases, APIs, or even "real-world" concerns like the current time.

What You'll Learn

  • Why test isolation is a fundamental skill for writing robust unit tests.
  • How to replace external dependencies with Test Doubles.
  • Practical techniques for handling time-dependent code.
  • The key to writing fast, reliable, and predictable tests.

Watch the Video Tutorial

This video is an excellent resource for anyone who wants to improve the quality and reliability of their test suite.

👉 Click here to watch the full tutorial!

Episode 019 Unit Test Isolation

Getting Started

To run the code and follow along with the video, you'll need PHP and Composer.

  1. Clone the repository:
git clone https://github.com/testingallthethings/019-unittest-isolation-php
cd 019-unittest-isolation-php
  1. Install the dependencies:
composer install
  1. Run the tests:
./vendor/bin/phpunit

About The Engineering Coach

The Engineering Coach is a YouTube channel dedicated to helping software engineers and engineering managers improve their skills and craft. We provide practical advice and tutorials on topics that matter in the real world of software development.

Let's Connect

For more software engineering tutorials and coaching, subscribe to The Engineering Coach on YouTube. You can also connect with me on Bluesky or Mastodon.

Releases

No releases published

Packages

No packages published

Languages