PHP Unit Testing with PHPUnit Free Download. Unit test your PHP code using the PHPUnit testing framework: find bugs quickly and early, and improve your code quality.
If you are a PHP developer and you want to learn how to write better code, with fewer bugs, you will need to know how to write unit tests. Learning how to write unit tests for your code will make you write better code. With automated tests, you can find bugs more easily, and if you break something you’ll notice straight away.
PHP Unit Testing with PHPUnit Free Description
How do you currently test your code? Maybe you run your code in a browser, use var_dump a lot and so on. The problem with this is that you only tend to test new code – you don’t go back and test old code. What if you add some new code that breaks the old code?
With automated unit tests, you have more control. If your new code breaks something, you’ll notice straight away. You can fix bugs more easily, thereby reducing development time.
Tests are also a form of documentation, just like comments: they serve to show why the code has been written that way.
- Suitable for all PHP developers, you’ll start by learning the basics of unit testing PHP code, including how to use assertions.
- Then you’ll learn how to test functions and classes, and how to configure the PHPUnit framework.
- Next you’ll learn how to use test dependencies, fixtures and how to test for exceptions.
- You’ll also see how test doubles work – mock objects and stub methods.
- Then you’ll learn how to write code using test-driven development – writing the tests first, then the code.
- You’ll also learn how to test protected and private class methods and properties, and whether this is actually a good idea or not.
- Testing static methods is covered in detail, including several methods for dealing with static dependencies.
You must know PHP, including object-oriented code
Be happy running commands in the terminal / command line on your computer
Ideally have PHP and Composer installed, but a brief overview of installing these will be covered
What you’ll learn
Write automated tests for your functions and classes
Write better code with less bugs, in less time
Develop code using test-driven development
Know that the code you write works how you want it to
Have improved documentation for your code
Get support directly from the instructor
Who this course is for:
- PHP developers who want to improve the quality of their code by writing automated tests for their functions and classes
- PHP developers who want to learn the PHPUnit testing framework
- This course is about unit testing – this course is probably not for you if you’re looking to learn how to test the user interface
PHP Unit Testing with PHPUnit Free Download
Content From: https://www.udemy.com/course/php-unit-testing/