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

API Platform 3 Part 3: Custom Resources
SymfonyCasts
API Platform 3 Part 2: Security for your Treasures
SymfonyCasts
Dependency Injection and the art of services and containers
SymfonyCasts
Mastering Doctrine Relations
SymfonyCasts
EasyAdmin! For an Awesomely Powerful Admin Area
SymfonyCasts