Using HTTPlug Bundle in a Test Environment
summary
Shows how to test HTTP calls when using HTTPlug in Symfony projects: why you might mock external web services, how to use HTTPlug’s mock-client to create and attach mocked responses, and how to store mock response files in the project to automate response creation. Also covers strategies for testing HTTP calls when HTTPlug is not yet in use, with concrete usage examples.
AI-written summary · about
chapters (25)
- 0:00Introduction
- 3:22I. Configuring HTTPlug
- 4:21I. Installation
- 5:07I. To summarize
- 6:10I. Testing is doubting.
- 8:47II. Using the mock client
- 9:25II. Installing the mock client
- 10:03II. Configuring the mock client
- 10:50II. Testing with the mock client
- 11:21II. The class to test
- 12:12II. The associated test
- 15:00II. So far, so good
- 16:20III. A bit of automation with the « File client
- 17:49III. The signature
- 18:24III. The associated code
- 19:12III. One interface to rule them all.
- 21:08III. Using the FileClient
- 21:31III. Replacing the client
- 22:37III. The test (or dev) configuration
- 23:02III. The factory
- 23:52III. The first times...
- 24:26III. Creating the fixtures
- 24:38III. All is well
- 25:19IV. Closing words
- 31:07III. Inside the client
related talks
59mYour tests are mocking you
20mTDD with WebMock
31mTesting API's written in PHP using the Behat feature testing tool
16mMastering Mocking in Playwright: Simplify API Test Automation
34mTesting APIs written in PHP using the Behat feature testing tool
40mStrategic Business Functionality Testing: Accelerating Development Through Mocking
13mSpeed up writing tests with Wiremock Spring Boot
50mMocking Dependencies in Unit Tests with Phake
