Refactor mockRecord method to support string input.
This commit is contained in:
parent
36a2d52041
commit
2c83604057
1 changed files with 6 additions and 1 deletions
|
@ -127,8 +127,13 @@
|
||||||
* @param DnsRecord $record The DNS record to be associated with the specified domain.
|
* @param DnsRecord $record The DNS record to be associated with the specified domain.
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function mockRecord(string $domain, DnsRecord $record): void
|
public static function addMock(string $domain, DnsRecord|string $record): void
|
||||||
{
|
{
|
||||||
|
if(is_string($record))
|
||||||
|
{
|
||||||
|
$record = DnsHelper::parseTxt($record);
|
||||||
|
}
|
||||||
|
|
||||||
self::$mockedRecords[$domain] = $record;
|
self::$mockedRecords[$domain] = $record;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue