Tags
Language
Tags
August 2025
Su Mo Tu We Th Fr Sa
27 28 29 30 31 1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31 1 2 3 4 5 6
    Attention❗ To save your time, in order to download anything on this site, you must be registered 👉 HERE. If you do not have a registration yet, it is better to do it right away. ✌

    ( • )( • ) ( ͡⚆ ͜ʖ ͡⚆ ) (‿ˠ‿)
    SpicyMags.xyz

    PHP Unit Testing with PHPUnit

    Posted By: lucky_aut
    PHP Unit Testing with PHPUnit

    PHP Unit Testing with PHPUnit
    Last updated 6/2025
    Duration: 2h 49m | .MP4 1920x1080 30 fps(r) | AAC, 44100 Hz, 2ch | 840.50 MB
    Genre: eLearning | Language: English

    Unit test your PHP code using the PHPUnit testing framework: find bugs quickly and early, and improve your code quality

    What you'll learn
    - Write automated tests for your PHP functions and classes
    - Write better code with less bugs, in less time
    - Develop code using test-driven development (TDD)
    - Know that the code you write works how you want it to
    - Learn the industry-standard PHPUnit testing framework
    - Get support directly from the instructor

    Requirements
    - 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

    Description
    If you are aPHPdeveloper and you want to learn how to writebetter code, withfewer bugs, you will need to know how to writeunit tests.

    Learn how to unit test your PHP code using the PHPUnit testing framework.

    Learn what unit tests are

    Learn how to write unit tests using PHPUnit

    Build a test suite for PHP functions and classes

    Make test methods dependent on each other

    Use test doubles: mocks and stubs, including how to use Mockery

    Learn how and why you should use dependency injection

    Learn test-driven development (TDD)

    Learn how to test protected and private methods and properties (and whether you actuallyshouldor not!)

    Learn how to test abstract classes

    A skill that will enable you to write higher quality code, in a shorter time, with better documentation and fewer bugs.

    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.

    Many experienced developers write unit tests for their code. It's a repeatable way of checking that the code works as intended, and also serves as documentation. Many popular PHP projects are unit tested, such asWordPressandMoodle, and if you use frameworks such asLaravelorSymfony, these provide tight integration with the PHPUnit testing framework.

    Content and Overview

    How do you currently test your code? Maybe you run your code in a browser, usevar_dumpa 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 useassertions.

    Then you'll learn how to testfunctionsandclasses, and how to configure the PHPUnit framework.

    Next you'll learn how to use testdependencies,fixturesand how to test for exceptions.

    You'll also see how test doubles work -mock objectsandstub methods.

    Then you'll learn how to write code usingtest-driven development- writing the tests first,thenthe code.

    You'll also learn how to testprotectedandprivateclassmethodsandproperties, and whether this is actually a good idea or not.

    Testingstatic methodsis covered in detail, including several methods for dealing withstatic dependencies.

    When you complete the course you'll be able to write unit tests for your existing PHP code, and develop new code using test-driven development.

    Complete with all the code shown in the lectures, you'll be able to work alongside the instructor and will receive a verifiable certificate of completion upon finishing the course.

    Also, at all times throughout the course you have access to the instructor in the Q&A section to ask for help with any topic related to the course.

    Enrol nowand add unit testing to your PHP skillset!

    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
    More Info

    Please check out others courses in your favourite language and bookmark them
    English - German - Spanish - French - Italian
    Portuguese