@@ -214,14 +214,14 @@ record, can be slow to execute and unreliable due to the conditions of the
214
214
network. For that reason, this component also provides mocks for these PHP
215
215
functions:
216
216
217
- * :phpfunction: `checkdnsrr() `
218
- * :phpfunction: `dns_check_record() `
219
- * :phpfunction: `getmxrr() `
220
- * :phpfunction: `dns_get_mx() `
221
- * :phpfunction: `gethostbyaddr() `
222
- * :phpfunction: `gethostbyname() `
223
- * :phpfunction: `gethostbynamel() `
224
- * :phpfunction: `dns_get_record() `
217
+ * :phpfunction: `checkdnsrr `
218
+ * :phpfunction: `dns_check_record `
219
+ * :phpfunction: `getmxrr `
220
+ * :phpfunction: `dns_get_mx `
221
+ * :phpfunction: `gethostbyaddr `
222
+ * :phpfunction: `gethostbyname `
223
+ * :phpfunction: `gethostbynamel `
224
+ * :phpfunction: `dns_get_record `
225
225
226
226
Use Case
227
227
~~~~~~~~
@@ -266,8 +266,10 @@ the data you expect to get for the given hosts::
266
266
// ...
267
267
}
268
268
269
- The ``withMockedHosts() `` method can return any number of hosts with different
270
- configuration, so you can simulate diverse network conditions::
269
+ The ``withMockedHosts() `` method configuration is defined as an array. The keys
270
+ are the mocked hosts and the values are arrays of DNS records in the same format
271
+ returned by :phpfunction: `dns_get_record `, so you can simulate diverse network
272
+ conditions:
271
273
272
274
DnsMock::withMockedHosts(array(
273
275
'example.com' => array(
0 commit comments