Course Outline
Day 1: Introduction to Unit Testing and PHPUnit
1. Introduction to Software Testing
- The importance of tests in the software lifecycle
- Overview of test types: unit, integration, system
2. Basics of Unit Testing
- Definition and objectives of unit testing
- Advantages of introducing unit tests to a project
3. Introduction to PHPUnit
- Installation and configuration of the environment
- Structure of a unit test: setup, test cases, teardown
- Basic assertions and annotations in PHPUnit
4. First Steps in Writing Tests
- Creating simple tests for functions and methods
- Organizing tests: grouping, dependencies, excluding tests
5. Practice: Creating Tests for a Sample Application
- Practical exercises: writing tests for an existing class
- Analyzing test results, dealing with errors
Day 2: Advanced Techniques and Best Practices
6. Testing Behaviors with Mock Objects
- Introduction to mocking and stubbing
- Examples of using mocks in PHPUnit to simulate dependencies
7. Advanced Assertions and Annotations
- Assertions concerning exceptions, arrays, objects
- Using data providers for parameterized tests
8. Test Driven Development (TDD) with PHPUnit
- Red-Green-Refactor cycle: from theory to practice
- Practical example of TDD application in a project
9. Best Practices in Unit Testing
- Test coverage: how to measure and interpret
- Organization and maintenance of a unit test suite
10. Tools and Extensions Supporting PHPUnit
- Overview of useful tools and libraries
- Test automation: integration with CI/CD systems
11. Summary and Discussion
- Discussion of the biggest challenges and common mistakes
- Answers to questions, sharing participants' experiences
This training plan is designed to ensure participants have a solid foundation in unit testing and practical skills in using PHPUnit. The balance between theory and practice allows for a better understanding of the material and application of learning in real projects.
This is example outline. To customize course outline to your specific expectations please contact NobleProg.
Requirements
- A solid foundation in PHP coding
- Experience with testing is helpful, but not required
Audience
- Intermediate to advanced PHP developers who want to improve the testability of their code
Delivery Options
Private Group Training
Our identity is rooted in delivering exactly what our clients need.
- Pre-course call with your trainer
- Customisation of the learning experience to achieve your goals -
- Bespoke outlines
- Practical hands-on exercises containing data / scenarios recognisable to the learners
- Training scheduled on a date of your choice
- Delivered online, onsite/classroom or hybrid by experts sharing real world experience
Private Group Prices RRP from £3800 online delivery, based on a group of 2 delegates, £1200 per additional delegate (excludes any certification / exam costs). We recommend a maximum group size of 12 for most learning events.
Contact us for an exact quote and to hear our latest promotions
Public Training
Please see our public courses
Testimonials (5)
Provided with nestjs even though it was not on the agenda
Suhail - Maldives Pension Administration Office (Pension Office)
Course - Typescript Unit Testing
I enjoyed everything as it is all new for me and I can see the added value it can ring to my work.
Zareef - BMW South Africa
Course - Tosca: Model-Based Testing for Complex Systems
Exercises were nice
Vyshnavi Iyappan - Red Embedded Consulting Sp. z o.o.
Course - Unit Testing with Python
It was easy to understand and to implement.
Thomas Young - Canadian Food Inspection Agency
Course - Robot Framework: Keyword Driven Acceptance Testing
The instructor tried to make things dynamic, and he demonstrated dominance of the topic.