YoVDO

PHPUnit: Unit Testing with a Bite!

Offered By: SymfonyCasts

Tags

PHPUnit Courses GitHub Courses Symfony Courses Unit Testing Courses Test-Driven Development Courses Mocking Courses

Course Description

Overview

Wait, someone built ANOTHER dinosaur park with ZERO tests!?!? I've seen this movie before and it's up to us: to add a rich set of tests before the dinos come for us...

But seriously: testing is great. It's not only a tool for preventing bugs, it's also a development philosophy that can help you write code that's more focused on what you actually want to build.

In this tutorial, we'll get you to super-hero status of unit testing, including:

  • Basic unit testing
  • Test-Driven-Development: how to do it, when to do it!
  • Using data providers to run tests over and over again with different input
  • Mocking and test doubles! Creating mocks in PHPUnit
  • The PHPUnit executable and configuration
  • Testing for exceptions

What about "integration" and "functional" testing? Stay tuned for the next tutorials in this series!


Syllabus

  • PHPUnit Install
  • Our First Test
  • Testing Class Methods
  • TDD - Test Driven Development
  • TDD Part 2: Finish & Refactor
  • Data Providers
  • Incomplete Tests and Dancing Dino's
  • Create a GitHub Service Test
  • GitHub Service: Implementation
  • Mocking: Test Doubles
  • Mocking: Stubs
  • Mocking: Mock Objects
  • Filtering Out Hungry Dino's
  • Testing Exceptional Exceptions
  • Mocking Symfony's Http Client
  • Setup and Tearing It Down

Taught by

Jesse Rushlow and Ryan Weaver

Related Courses

Introduction to Agile Software Development: Tools & Techniques
University of California, Berkeley via edX
Advanced Topics and Techniques in Agile Software Development
University of California, Berkeley via edX
The Data Scientist’s Toolbox
Johns Hopkins University via Coursera
How to Use Git and GitHub
Udacity
Desarrollo de Videojuegos 3D en Unity: Una Introducción
Universidad de los Andes via Coursera