Testing is an essential PHP skill...you'll learn EVERYTHING here


This course comes with subtitles in your language

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


Samuel Ferreira

Learning To Test IS Learning To Code




Learning how to test code is learning how to write code that is testable...the two go hand in hand. Once you perfect this skill, your dev abilities increase significantly along with confidence in your code.

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.

Why Should You Enroll In This Course?



💰 Testing is an essential skill that can only advance your career



💪 Your code will become more predictable and reliable



🆕 The information is current and relevant to the market



🧠 You will achieve an advanced level of understanding of testing PHP




🌴 Flexible. You can work at your own pace. Take as long as it takes.




🔍 No other courses teach this subject with the same level of attention to detail



📈 Promotion. To become a senior PHP developer you will need to understand testing strategies


BUY THIS COURSE NOW

One payment of $69 + VAT added on checkout page




✅ 5★ rated course
✅ 100 video tutorials for $69
✅ Subtitles in your language
✅ Over 13 hours of content
✅ All code examples included
✅ Lifetime ownership
📜 Certificate of achievement
🤝 30 days money back guarantee





By the end of the course you will have a complete understanding of all these concepts and testing strategies

Unit Testing - Feature Testing - Integration Testing
Test Doubles (Mocks n Fakes) - Writing Testable Code - Refactoring For Testability
Testing External Services -Test Databases - Test Driven Development
Test Coverage - Test Triangulation and Datasets - Testing Request > Response-
Grouping and Filtering Tests - Testing Multiple Logic Paths - PHPUnit - PHPStan static analysis


PLUS MUCH MORE!!




HOW DOES THAT SOUND SO FAR?..

..HERE'S WHAT'S COVERED IN THIS COURSE

The first thing that you need to do is to get comfortable with your testing tool(s). PHPUnit has been the de facto testing framework for PHP for many years. You will have heard of other testing frameworks such as PEST (check out my Test Driven PHP course) and Codeception..BUT..an important thing to know is that these frameworks are built on PHPUnit and cannot exist without it....so the first thing we'll do is master this important tool.


Once we are comfortable with our tools and our setup and we have written our first tests, it's then time to get serious and start to examine some testing strategies. For this we'll work on a small project which presents some challenges to testing. We will attack this code with a combination of unit tests, feature tests, and integration tests to leave the code in better shape and with maximum coverage.




We'll then have a look at a load of other things which you can introduce to your testing toolkit. There is an entire section dedicated to test doubles which will really help you make your testing more accomplished and focussed.



The section on Test Driven Development contains over 20 videos and shows you how to apply the 'theory' of TDD in practice. We'll create a piece of functionality which enables you to perform math with different amounts of money, in different currencies. Not an easy thing to do, with lots to think about..BUT with TDD we'll make it look easy!

Below is a list of the content that I cover. These are all of the core testing concepts that YOU NEED TO KNOW.



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)

13 videos

  • Testing strategies introduction
  • 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
Static Analysis with PHPStan

12 videos

  • Installing PHPStan
  • Command Options
  • PHPStan Rule Levels
  • Ignoring Errors
  • Introduction to PHPStan Config
  • Shared Configuration
  • Generating The Baseline
  • Add PHPStan to an Existing Codebase
  • PHPStan Extensions
  • Fixing Common Errors
  • Config Practice
  • Running Tests in CI




Click This 👆 To Check out the PHP Professional Toolkit



BUY THIS COURSE NOW

One payment of $69 + VAT added on checkout page




✅ 5★ rated course
✅ 100 video tutorials for $69
✅ Subtitles in your language
✅ Over 13 hours of content
✅ All code examples included
✅ Lifetime ownership
📜 Certificate of achievement
🤝 30 days money back guarantee






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


Best tutorial on this topic. Ilian Karasimirov

This course is very practical - Vakhtang


Very, very interesting and helpful - Ruslan


Course is clear, direct and easy to follow, even if one didn't use testing in the past - Richard


This is very useful course - Muhammad Nadeem


I didn't ever use phpunit because it was so hard to understand and figure out. This sets it up to be a success from the start to do TDD - Mr J


This course is very helpful in my php career - Asadullah


In depth course with great real life examples. Delivery of content is engaging and enjoyable - Joshua Caine


Really excellent course! - Brandon Oakley

Detailed in-depth premium content. Worth every penny - Janroe

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

The course delivers a lot of specific knowledge that is not found anywhere else and the focus on complicated tests is very nice. The fact that the course keeps getting updated is a bonus. Eduardo

This course has clear explanations and Gary has the patience to explain every detail, which I think is very important. Demian

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

Everything is perfect with this course. I am watching it for my team and am pretty sure they will love it - Mathieu

I just appreciate all of Gary's work!!!!!! - Karyna

Good explanations, concrete and diverse cases - Mikaidou

Check Out These Sample Videos From The Course


All videos come with subtitles in your language



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.

Test Coverage

Test coverage is a measure of how much of the code base is executed when the tests are run. It is NOT an indicator that your code is fully tested because there could be many parts of your code which are executed when the tests run but which could have multiple outcomes...these are not factored into the test coverage score.

Flatten an Array

Our data comes back from an API as a multidimensional array but we want it in the shape which our application understands.

An underlying test will help us to flatten this array. We also want to preserve the keys for the individual values.

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

BUY THIS COURSE NOW

One payment of $69 + VAT added on checkout page




✅ 5★ rated course
✅ 100 video tutorials for $69
✅ Subtitles in your language
✅ Over 13 hours of content
✅ All code examples included
✅ Lifetime ownership
📜 Certificate of achievement
🤝 30 days money back guarantee






Check Out My Other PHP Full Length Courses

PHP Professional Toolkit

💰 Massive Saving!

All of my best PHP courses bundled into one product.
Save over $100 today!


Object Oriented PHP

A complete guide to Object Oriented Programming in PHP


PHP Framework Pro

Essential learning for every PHP developer


Git and Github logos

Git and Github

A practical guide to Git and Github



Docker + PHP

A practical guide to Docker with PHP. Includes bonus material



Test Driven PHP Logo

Test Driven PHP

A really cool way of writing clean PHP code that works.



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


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


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


Mikaidou⭐️⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


Karyna⭐️⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


Mathieu⭐️⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


Pawal⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Knowledgeable instructor


Edin⭐️⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


Magid Soudeni⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


V.Berg ⭐️⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


Eduardo ⭐️⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


Demian⭐️⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


Marek⭐️⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


Andy⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


Vakhtang ⭐️⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


Richard ⭐️⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


Muhammad Nadeem ⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


Mr J ⭐️⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


Jakub ⭐️⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


Ruslan ⭐️⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


Stanislau Pamaleika ⭐️⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


Tony ⭐️⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


Asadullah ⭐️⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


German⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


Lorenzo⭐️⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


Joshua Caine⭐️⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


Brandon Oakley⭐️⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


Cesar Schefer⭐️⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


David Carr⭐️⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


Janroe⭐️⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


Paolo Maggio⭐️⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor


Bhupendra sinh Jadeja⭐️⭐️⭐️⭐️⭐️


✅ Valuable information ✅ Helpful practice activities ✅ Clear instructions

✅ Accurate course description ✅ Engaging delivery style ✅ Knowledgeable instructor