THE COMPLETE GUIDE TO PHP TESTING


Please watch this short clip to find out what this course is all about 👇

"I want to hit the like button for every test passed. Thanks, the best tutorial on this subject."



Samuel Ferreira


WHAT'S COVERED IN THIS COURSE?


There's a lot of material out there that shows you HOW to write basic tests that cover basic scenarios.
Assert that string 'foo' does not equal 'bar'? No problem!
But how do you know WHAT to test, in what order, and WHERE to start?
How do you know that your code has sufficient test coverage?
Is some code impossible to test? What would YOU do if it was?



SIMPLE EXAMPLES ARE FINE FOR LEARNING THE BASICS OF TESTING BUT THEY ARE NOT GOING TO TEACH YOU HOW TO TEST REAL APPLICATIONS...



I'm sorry but there's a lot more to it...The good news is that THE ANSWERS ARE ALL CONTAINED WITHIN THIS COURSE...keep reading.


Getting Started With PHPUnit


8 videos

  • Installing PHPUnit
  • Write your first test
  • Testing functions
  • Testing class methods
  • Command line options
  • Filtering tests
  • Errors vs failures
  • Autoloading


PHPUnit Workflow and Configuration

8 videos

  • The setUp method
  • The tearDown method
  • Using tests to refactor
  • Some common assertions
  • Custom failure messages
  • Configure PHPUnit using phpunit.xml
  • Testing errors and exceptions
  • Data providers
Testing Strategies Part One (Unit Testing)

14 videos

  • Testing strategies introduction
  • Create a Twitter developers account
  • The project files
  • Create the database table
  • The test plan
  • Risky tests and incomplete tests
  • Mocking
  • Refactoring for easier testing
  • Mocking static methods
  • Test new followers per week
  • Testing all logic paths
  • Should you replace static methods?
  • Tidy up unit testing loose ends
Testing Strategies Part Two (Integration Testing)

15 videos

  • Introduction to integration testing
  • When not to mock
  • Testing API integration
  • Grouping tests using @group
  • Authentication exception testing
  • Intro to testing against a database
  • Create a test database connection
  • Create a database refresh tool
  • Database dependant test case
  • Testing ordered database records
  • Testing null database returns
  • Test saving to the database
  • Create a database test assertion
  • Flatten an array
Testing Strategies Part Three (Feature / Functional Testing)

4 videos

  • Introduction to feature testing
  • Feature test setup
  • Feature test assertions
  • Running the feature tests
Test Doubles


9 videos

  • PHPUnit Test Doubles
  • Testing expectations
  • Faking method return values
  • Testing consecutive returns
  • Throwing exceptions from stubbed methods
  • Will return callback
  • Test faked methods receive correct arguments
  • Test faked methods receive correct arguments using callbacks
  • The mock builder
Test Coverage


4 videos

  • Test coverage introduction
  • Test coverage setup
  • HTML Format coverage report
  • Maximising test coverage
Test Driven Development


21 videos

  • Introduction
  • Setup
  • TDD baby steps
  • Red > Green > Clean
  • Value objects
  • Privacy
  • Dollar objects
  • Common equals
  • Apples and oranges
  • Eliminating duplicate classes
  • Simple currency
  • Ask the computer
  • A BIG clean up
  • Simple addition
  • A sum of moneys
  • Make it
  • Adding mixed currencies
  • The extra mile
  • Multiplying sums
  • Let's go crazy
  • Retrospective
Applying TDD to our Testing Strategies Project

2 videos

  • Using tests to switch libraries
  • Switching libraries
Testing HTTP Request -> Response

6 videos

  • Testing HTTP Request / Response introduction
  • Laravel test setup
  • Asserting against response content
  • Testing authenticated endpoints
  • Create a post model
  • Full Request -> Response test

Here is what people have said about this course and its preview material...


Best tutorial on this topic. Ilian Karasimirov

Unit testing has been a low point in my professional PHP career the last few years. Have not found decent training anywhere. So glad to have found this course. - Karl Zipser

I like all your videos, great work. Keep rocking! Thank you for everything. Gokul jadhav.g

I want to hit the like button for every test passed. Thanks for the best tutorial available on this subject. Samuel Ferreira

You explain the Mock in unittest with very easy understanding, you have reproduced different use cases that are very important to understand!! Thank you so much! 優散的傻勢

I have ADHD and have trouble with getting comfortable with tutorial styles and formats. Your video here is just bliss to me. Thank you thank you! Please don't stop making videos! Sofascialistadankula Megadonakeratosis

Clear and detailed. - Piero Recchia

The testing PHP course is long, but very good and amazingly informative. Testing is something that has always eluded me, so the course has definitely given me a grounding and something I can/will refer back to. Thanks for the course Gary and your other OOP course, they have been excellent. - Jonathon Wood

Enroll In This Course Now




✅ 5★ rated course
✅ 100 video tutorials for $59
✅ Over 13 hours of content
✅ All code examples included
✅ Lifetime ownership
📜 Certificate of achievement
🤝 Lifetime money back guarantee



Check Out These Sample Videos From The Course



Testing Class Methods

The courses starts by installing the PHPUnit testing framework and then writing our first tests. In this sample we look at testing class methods.

Refactoring For Easier Testing

Sometimes your code might feel like it is hard to test. Instead of reaching for a bunch of workarounds involving test doubles etc. you should first ask yourself whether the code could be refactored to make it easier to test.

Testing API Integration

A lot of developers will just mock out any interaction with external services. I do this for my unit tests but usually still write integration tests which can be run separately and which do actually communicate with those services. It's just thorough.

Red > Green > Clean

This course includes an in-depth on Test Driven Development which adapts an example by Kent Beck. TDD is an interative process where you: 1. Quickly create a failing test. 2. Make that test pass by whatever means. 3. Refactor for clean code. I call these steps Red, Green, Clean

Enroll In This Course Now




✅ 5★ rated course
✅ 100 video tutorials for $59
✅ Over 13 hours of content
✅ All code examples included
✅ Lifetime ownership
📜 Certificate of achievement
🤝 Lifetime money back guarantee



Who am I?



Hello and thank you so much for checking out my work. My name is Gary Clarke and I'm a software developer with many years experience, primarily in PHP. I started creating video tutorials during lockdown in 2020 because I wanted the challenge of being able to explain complex / technical subjects to others in a way which is easy to undertsand and remember.

At this moment in time, my videos have been watched nearly half a million times and I intend to keep creating new and improved content and teaching more and more new people. It would be my pleasure to see you on the inside of one of my courses.


Adrien ⭐️⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


Sahraoui ⭐️⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


Maxime Hu ⭐️⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


Gabor ⭐️⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


Karl Zipser ⭐️⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


Piero Recchia ⭐️⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


Sahraoui ⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


Jonathon Wood ⭐️⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor