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
Testimonials (7)
The trainer was very knowledgeable and dynamic, keeping engagement and focus of the team during the whole training. I would definitely recommend it as I reckon learnings from this training can be quickly applied to our everyday development workflow.
Inigo
Course - iOS Automation 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
Very nice approach to the topic and based on practical examples
Tomasz - Biuro Rachunkowe Magda Sp. z o.o.
Course - Automate Windows Desktop Applications with AutoIt
Machine Translated
The exercises
Florin Mazilu - SOJUS Software GmbH & Co. KG
Course - Unit Testing with JUnit
Everything, great trainer.
Michał Rawicki
Course - Unit Testing with Python
Machine Translated
the trainer level.
Titus - Ness
Course - Unit Testing with C#
The course, The Trainer