"The MOST COMPLETE PHP Testing Courses On The Internet"
"I want to hit the like button for every test passed. Thanks, the best tutorial on this subject."
Samuel Ferreira
Transform Your Code with Advanced PHP Testing Techniques
Why Learn to Test?
Learning to test isn't just a skill—it's a fundamental part of coding. When you understand testing, you understand how to write better, more robust code. Testing and coding go hand in hand, enhancing your development skills and boosting your confidence in the code you write.
Beyond the Basics
Sure, anyone can follow simple tutorials on how to assert that string 'foo' does not equal 'bar'. But what about the real challenges? How do you determine what to test, the order of tests, or where to even start? How do you ensure your code is adequately covered by tests? What about code that seems impossible to test? These aren’t just theoretical questions—they're real challenges that developers face every day.
What Sets This Course Apart?
While basic tutorials have their place, real-world applications demand deeper understanding and more sophisticated strategies. This course goes beyond simple examples to teach you how to design tests for complex, real-life PHP applications. You'll learn not just how to test, but how to think about testing in a way that makes your code bulletproof.
Discover the Answers Inside
Frustrated by courses that only scratch the surface? This comprehensive curriculum covers everything from fundamental principles to advanced testing strategies. All the answers you need are right here, in a structured format that will guide you through mastering PHP testing.
Why Should You Enroll In These Courses?
Advance Your Career with Essential Skills
💼 Economic Value: Mastering testing is not just a skill—it's a career accelerator. Companies value developers who can ensure software reliability through comprehensive testing.
Enhance Code Quality
🛠️ Reliability: Learn to write code that not only works but is also predictable and robust under various scenarios. This course makes your output stand out as reliable and high-quality.
Stay Current and Relevant
📅 Market Relevance: The content of this course is continuously updated, ensuring that you’re learning the most current testing techniques that are directly applicable in today’s tech landscape.
Deepen Your Technical Expertise
🧠 Advanced Understanding: Achieve a profound level of knowledge in PHP testing. This course takes you beyond basics to advanced strategies that are crucial for complex projects.
Learn at Your Own Pace
🌴 Flexibility: No deadlines or rush. You control your learning pace, making it easier to balance with your personal and professional life.
Unmatched Depth and Focus
🔍 Attention to Detail: Unlike other courses, I delve deeper into the nuances of PHP testing, providing you with a thorough understanding that is hard to find elsewhere.
Prepare for Senior Roles
📈 Career Progression: This course equips you with the testing strategies necessary to move into senior developer roles, an essential step for advancing in your career.
BUY THIS BUNDLE NOW
One payment of $89 + VAT added on checkout page
OR
LIMITED OFFER 3 PAYMENTS OF $30
✅ 2 x 5★ rated courses
✅ 200 video tutorials for $89
✅ Subtitles in your language
✅ 20 hours of content
✅ All code examples included
✅ Lifetime ownership
📜 Certificate of achievement
🤝 30 days money back guarantee
By the end of these courses 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
Building PHP API's - Expectations - Hooks - Datasets - Filtering Tests
Grouping Tests - Mocking - Custom Test Helpers
Custom Expectations - Refactoring With Confidence - Data Testing
PHP Framework Structure - Routing Techniques - Integration Testing
Feature Testing - Unit Testing - Testing API Endpoints
All PEST Features - HTTP Request / Response - Routing Techniques
Data Mapper and Repository Patterns - Faking Data
PHP Data Objects (PDO) - Understanding Duplication
The Pragmatic Challenges of TDD - Json Web Tokens - API Security
HOW DOES THAT SOUND SO FAR?..
..HERE'S WHAT'S COVERED IN THE COURSES
Testing PHP
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 (we'll use this in the 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.
Test Driven PHP
Take a minute to think about how many much-sought-after skills you will gain by building an API from scratch using Test Driven Development combined with Pest PHP. This is not simply a PHP testing course, this is a course which is going to take your PHP skills to a whole new level.
I enrolled in a similar course a few years ago and it changed my career and my whole programming outlook. Everything became easier...and BETTER PAID!
I'm talking about things like gaining a complete understanding of application structure and EVERYTHING which happens between Request and Response. Knowing all of the components so well that you know when to use feature tests and when to use unit tests, where to mock objects and exactly how to do it.
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
Feature Tests
- Installing Pest
- Create an API Test
- Custom Test Helpers
- Custom Test Expectations
- Returning a Real Response
Unit Tests
- Response Test
- Response Class
- Application Sequence
- Request Class
- Request Test
- Request Query Params
- Request Path
- Request Method
- Kernel Class
Routing
- The Multiple Routes Problem
- Refactor For Routing
- Router Test
- Router Dispatch
- Route Handling Outcomes
- Setting Routes
Dependency Injection
- Service Container
- Binding a Service
- Controller Classes
- Invoking Handlers
- Route Parameters
- Resolving Route Handlers
- Mocking Dependencies
- Testing Routing Errors
- Using Datasets
- Route Handler Resolver Test
- Resolving a Controller Test
Entities and Repositories
- Data Considerations
- Repositories
- Grouping Tests
- Book Repository
- Entities
- The Dirty Filter
- Book Class
- Nesting Objects
- Serializing Objects
- Duplication vs Coincidence
Querying Data
- Faking Database Rows
- Sqlite
- PHP Data Objects (PDO)
- Retrying Test Using --retry
- Connection Objects
- Connection Test
- Connection Class
Migrations
- Environment Variables
- Migration Files
- Migrating a Test Database
- Console Commands
- Migration Dependencies
- Database Transactions
Persisting Data
- Fixing Feature Tests
- Refactoring Out Duplication
- Matching Project Structure
- Updating Pest
- Architecture Testing
- Testing For Strict Types
Refactoring FTW
- Fixing Feature Tests
- Refactoring Out Duplication
- Matching Project Structure
- Updating Pest
- Architecture Testing
- Testing For Strict Types
Real Usage
- Fixing Feature Tests
- Refactoring Out Duplication
- Matching Project Structure
- Updating Pest
- Architecture Testing
- Testing For Strict Types
JsonResponse Objects
- What is a JsonResponse?
- Specific Return Types
- JsonResponse Test
- JsonResponse Class
- Final Client E2E Test
JWT Auth Middleware
- PSR 15 Middleware
- Request Handler Test
- Request Handler Class
- Refactoring For Middleware
- Introduction to Json Web Tokens (JWT)
- JWT Structure
- PHP + JWT
- Encoding the JWT
- JWT Auth Middleware Test
- JWT Authenticate Middleware
- Testing Valid Tokens
- JWT + PHP Security Considerations
BUY THIS BUNDLE NOW
One payment of $89 + VAT added on checkout page
OR
LIMITED OFFER 3 PAYMENTS OF $30
✅ 2 x 5★ rated courses
✅ 200 video tutorials for $89
✅ Subtitles in your language
✅ 20 hours of content
✅ All code examples included
✅ Lifetime ownership
📜 Certificate of achievement
🤝 30 days money back guarantee
Check out some example videos from the courses
Mocking
Let's see how we can test a method in isolation by replacing its one big dependency with a mock object.
Feature Test Assertions
Let's write some assertions which will prove that a process has completed without any problems...the result of which will be correct data being saved to the database.
Maximizing Test Coverage
I'll show you some tools for checking your code test coverage. Let's investigate what is bringing our code coverage score down and see what steps we can take to rectify it.
Value Objects
Let's write a new test to help us drive out functionality to check whether two value objects are equal. In doing so we are going to employ a test tactic called triangulation.
Installing PestPHP
The Test Driven PHP courses uses the brilliant Pest PHP testing framework. The first thing that we are going to need to do is install Pest and initialize it. Then let's have a look around and run the example tests which come out of the box.
PHP Data Objects (PDO)
We can use PHP Data Objects and set the fetch mode to associative arrays which will mean that we can retrieve a row in the exact same format as we've prescribed.
JWT Structure
A JSON Web Token (JWT) consists of three main parts: the Header, the Payload, and the Signature. Let's dive into each part and also discuss how a JWT is verified.
Architecture Testing
Architecture testing is a cool feature of Pest which enables you to specify expectations that test whether your application adheres to a set of architectural rules, helping you maintain a clean and sustainable codebase.
BUY THIS BUNDLE NOW
One payment of $89 + VAT added on checkout page
OR
LIMITED OFFER 3 PAYMENTS OF $30
✅ 2 x 5★ rated courses
✅ 200 video tutorials for $89
✅ Subtitles in your language
✅ 20 hours of content
✅ All code examples included
✅ Lifetime ownership
📜 Certificate of achievement
🤝 30 days money back guarantee
Time For A Reality Check
Testing code is not easy...
Even as an experienced developer, I still come across scenarios that are difficult to test. But the things I show you here will prepare you for those scenarios.
But untested code is code which does not work and it will cause you problems...just when it's least convenient. Well written tests give you peace of mind...and that inspires confidence in the people you work with.
Most testing courses show you only how a testing framework works. They don't actually teach you where, when, why, what, and how to test. I will show you the tools and exactly how to use them to produce expertly tested code you can have 100% confidence in.
Here is what people have said about these 2 courses...
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
This is what people have had to say about my other courses...
I do not know of anyone else that can lecture on Frameworks and has the same depth of working knowledge. Thank you! Mark Corrigan
This is the course if you want a better understanding of TDD with useful examples and code along - Edin
It's really valuable because we go through all the steps of creating an API using TDD approach. There isn't much content of such quality available at such a reasonable price, so keep up the good work - German
The course answers exactly my needs. Jad
I really enjoy how the information is presented. I'm an experienced software engineer with knowledge related to PHP frameworks and the way information is presented is very valuable to me to recap the commonalities behind the specifics of PHP frameworks. Adrian Megreanu-Maior
I like this course and it was so worth waiting for. Alexis
Great work! Eric
Excellent course. Gives me the detail I am looking for. Mark Corrigan
I can understand the clear and perfect explanations - Luis Solis
This is perfect! - Unjoined
You have a great way of explaining OOP - Locoplata
This is one of the best courses I have ever done. You have a gift for teaching. Your training has given me very valuable context for all things I knew, corrected some stuff I did incorrectly, and has taught me innumerable new things. - Mark Thijssen
Making me enjoy coding again. - Drew Hinde
Gary has deep knowledge and he is following the best practices. I have no suspicions about learning non-useful nor obsolete techniques. It is essential to have work / code discipline and he has it and kind of routing you to have the same. - Burak
Gary has a patient delivery style, and I can understand him. I also appreciate that code for the video is provided, with each video, because I like to spend time testing and changing that code to get further into it. - Karl Zipser
Well explained step by step approach - Takunda Chibanda
The way of teaching is so good with real time examples. There is also engaging activities - Lokith S
Information delivered clearly and in a well-structured way - Sim
This course is fantastic! I'm really looking forward to watching the rest of the course. Thanks a million Gary! - Michael Gibbs
Well structured and taught - Suleyman Solak
Great tutorial! - Fh Ndiritu
It's much more pleasant to follow than most other courses I have tried. - Mick Amato
Thanks for this video, been watching it for the 2nd time and I can't even feel the time goes by - Lexer Quine
I won't lie, I've watched a lot of php oop course and this is the best!! Thank you king - Yasser Latrach
PHP is making sense and I can apply what I am learning at my job - Dee
Very engaging and easy to understand the concepts - Luciano
I'm very happy with the course and the instructor. - Paulo
Gary explains OOP with PHP very clearly and is easy to understand. I think it's simply great - thanks for creating it!! - Nicolas Alexander Rau
This course is a true gem! It's the first time I watched a 3h course and felt I really understood the concepts. Thank you so much Gary! Looking forward to the full course:) - Giulia Pizzignacco
I saw all the videos of oriented object programming and they were awesome! Great content - Arius
Great stuff for OOP in PHP for beginners and great reminders for other Devs. - TomTom Shaylash
Excellent course delivered by a knowledgeable and engaging content creator. Highly recommended - Drew Hinde
I have learnt so much new information which helps me to write efficient php (oop) code. I am very thankful to Gary for providing such quality content - Ridwanullah Raufi
I'm very pleased with the way Gary explains everything. - Rob Spruyt
I'm enjoying the clear English of Gary, well spoken and succinct explanation of his code. - James
Exactly what I needed for my level of coding, I can create crud applications in PHP, but OOP is completely new to me. - Tom
Sufficiently long sections to be able to take in the information, it makes it easier to understand. Very good explanations. - Mats Akebrand
I have had an extremely positive experience with this course, so Mr Clarke had definitely earned a perfect 5 stars from me! This course has helped me to understand how OOP works SO MUCH better than I previously did. I 100% understand all of his examples. - Jeffrey Carter
Excellent course, interesting and engaging - Clive
Thank you so much! Appreciate your hard work - Paul Toma
Great work. Waiting for next videos - Alwin Augustin
Beautiful work! - Mohammed B
Great work. Thank you Sir! - Yusuf Aliya
Great video! Thanks so much - Ck
Interesting tutorial, thanks for all! - Mdazhardware
Thanks, awesome work!- Hamad Adel
Great work!- Houssem Rahrah
Thanks for your time we appreciate it!- Mamadou Aly Sy
Great!- Sergey Vasko
Nice course- Kennedy Muthui
Check Out My Other Courses
Six Essential Skills Bundle
This bundle contains all the courses which meet the six essential skills all PHP Developers MUST have.
MySQL for PHP Developers
Dive into the world of databases with this course tailored for PHP developers. Enhance your skills in database management and PHP integration.
PHP Professional Toolkit Plus
All of the skills you need to advance your PHP developer career. 4 courses bundled into one with a massive saving 💲
Symfony Framework Pro
Unlock your PHP potential and develop your skills to the next level with PHP Framework Pro & Symfony 7 Microservice.
PHP Framework Pro
Essential learning for every PHP developer, this course fills a big gap in your PHP framework knowledge.
Test Driven PHP
Take your dev skills to the next level by creating an API from scratch using TDD with the PestPHP testing framework.
Symfony 7 Microservice
I can guarantee this is the best way to learn Symfony by building something CURRENT and REAL
PHP API Pro
Every PHP developer will eventually be required to build and maintain APIs, follow this course to learn the essentials of API Development.
PHP Pro Bundle
Are you aiming to master the intricacies of PHP frameworks or become the go-to expert on APIs? Then this bundle is designed to catapult your career forward.
PHP Professional Toolkit
Within this bundle you will receive three modern PHP courses to take your skills to a whole new level, it includes everything a good dev needs to know.
Object Oriented PHP
Looking to master PHP Object-Oriented Programming? Then you're in the right place. This course will guide you through the core concepts and advanced techniques.
Testing PHP
Learning to test isn't just a skill—it's a fundamental part of coding. When you understand testing, you understand how to write better, more robust code.
PHP Bundle
Two 5 Star PHP courses, a total of 30 hours of quality PHP content, that is relevant for today's PHP developer. You buy one get the other half price giving a massive saving 💲
OOP and Framework Foundations
This bundle contains my two most popular courses: Learn Object Oriented PHP and PHP Framework Pro. Elevate your PHP skills to the next level.
The Battle Ready Programmer
Take your PHP + Laravel skills to a new level with The Battle Ready Programmer bundle, featuring a book created by Ash Allen.
Battle Ready Laravel
The ultimate guide to auditing, testing, fixing and improving your Laravel applications, created by Ash Allen.
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 understand and remember.
At this moment in time, my videos have been watched over a million times and I intend to keep creating new and improved content and teaching more and more new people. It would be a pleasure to see you on the inside of one of my courses.