Test Driven Development with PEST coming soon to this course!
⬇ Sign up for updates and discounts below ⬇
"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 $59 + VAT added on checkout page
✅ 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
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 - PEST coming July 23!
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 comfotable 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 (which we will cover) 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
Coming July 2023 - Testing with PEST
Let's build a lightweight REST API from scratch using Test Driven Development in PEST...you're gonna ❤️ this.
This is a mini-course which will be sold separately but owners of Testing PHP will get this included for FREE
BUY THIS COURSE NOW
One payment of $59 + VAT added on checkout page
✅ 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.
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 $59 + VAT added on checkout page
✅ 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
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