February 24-26, 2021
Online, Timezone GMT-5

Workshop: Unit Testing in PHP

Do you spend too much time debugging your code? Does manually re-testing everything seem unreliable and cause pre-release stress? With unit tests, you can significantly reduce these unpleasant tasks while increasing your confidence in the correctness of your software.

In this course, you will learn the fundamentals of unit tests and PHPUnit. You will then discover how to improve and simplify your tests using mocks. Finally, you will learn how to write integration tests for parts of your application that interact with the database and files. By the end of this course, you will be able to write good tests and increase the quality of your software.


Course Outline:

  • PHPUnit fundamentals: structuring tests, executing via command-line, assertions and annotations, bootstrap and configuration files.
  • Better tests: making tests faster, making tests easier to write and to maintain, spotting redundant or unreliable tests.
  • Using mocks: code and test isolation, types of mocks and how to use them, what not to mock, avoiding too many mocks.
  • Integration tests: testing code that depends on the database, filesystem or library with a complex API.
  • Code coverage: collecting code coverage and interpreting reports.
  • Continous integration: setting up a pipeline, ensuring that existing tests don't break.

Anna Filina

Filina Consulting

Anna has been a web developer since 1997. In her long consulting career, she developed an expertise in refactoring very old applications to be modern and testable. She is passionate about sharing her skills with fellow developers through her blog, YouTube channel, conferences and various articles. Anna also has an eye for technical debt, for which she then devises strategies that save companies a lot of money.

Read More

Comments

Please remain courteous and constructive. Comments will be moderated.

Online 2021 sponsored by