Skip to content

Instantly share code, notes, and snippets.

@alphaolomi
Created September 17, 2021 04:55
Show Gist options
  • Save alphaolomi/57a9f8cbe4c44ce44e6aea941a124ada to your computer and use it in GitHub Desktop.
Save alphaolomi/57a9f8cbe4c44ce44e6aea941a124ada to your computer and use it in GitHub Desktop.
LARAVEL TESTING like a Champ

TABLE OF CONTENTS

Getting started

  • Intro
  • Our first HTTP test
  • Using a database
  • Using factories
  • Factory relations
  • Testing a form
  • Authenticated testing
  • JSON assertions
  • Exploring the expectation API PEST
  • Automatically rerun tests PEST
  • Higher order tests PEST
  • Higher order expectations PEST

Mocking dependencies

  • Testing fakes
  • Mocking
  • Handcrafted mocks
  • Testing time

Testing Laravel in depth

  • Middleware tests
  • Validation in depth
  • Validation rule testing
  • Testing file uploads
  • Policy testing
  • Policies continued
  • Testing console applications
  • The HTTP facade
  • Testing blade components
  • Browser tests
  • Dusk in Depth
  • Testing Livewire
  • Testing Jobs
  • Custom factories

Configuring tests

  • Parallel testing PHPUNIT
  • Data providers
  • Configuring database connections

Testing tidbits

  • Testing exceptions
  • Testing domain code
  • Trying out TDD
  • Refactoring with tests
  • Regression testing
  • Snapshot testing
  • Tests and CI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment