@@ -385,7 +385,7 @@ public function testToBinaryForResponseWithPTRRecordWithSpecialCharactersEscaped
385385 public function testToBinaryForResponseWithMultipleAnswerRecords ()
386386 {
387387 $ data = "" ;
388- $ data .= "72 62 01 00 00 01 00 06 00 00 00 00 " ; // header
388+ $ data .= "72 62 01 00 00 01 00 07 00 00 00 00 " ; // header
389389 $ data .= "04 69 67 6f 72 02 69 6f 00 " ; // question: igor.io
390390 $ data .= "00 ff 00 01 " ; // question: type ANY, class IN
391391
@@ -401,6 +401,10 @@ public function testToBinaryForResponseWithMultipleAnswerRecords()
401401 $ data .= "00 10 00 01 00 00 00 00 00 0c " ; // answer: type TXT, class IN, TTL 0, 12 bytes
402402 $ data .= "05 68 65 6c 6c 6f 05 77 6f 72 6c 64 " ; // answer: hello, world
403403
404+ $ data .= "04 69 67 6f 72 02 69 6f 00 " ; // answer: igor.io
405+ $ data .= "00 63 00 01 00 00 00 00 00 0c " ; // answer: type SPF, class IN, TTL 0, 12 bytes
406+ $ data .= "0b 76 3d 73 70 66 31 20 2d 61 6c 6c " ; // answer: v=spf1 -all
407+
404408 $ data .= "04 69 67 6f 72 02 69 6f 00 " ; // answer: igor.io
405409 $ data .= "00 0f 00 01 00 00 00 00 00 03 " ; // answer: type MX, class IN, TTL 0, 3 bytes
406410 $ data .= "00 00 00 " ; // answer: … priority 0, no target
@@ -430,6 +434,7 @@ public function testToBinaryForResponseWithMultipleAnswerRecords()
430434 $ response ->answers [] = new Record ('igor.io ' , Message::TYPE_A , Message::CLASS_IN , 0 , '127.0.0.1 ' );
431435 $ response ->answers [] = new Record ('igor.io ' , Message::TYPE_AAAA , Message::CLASS_IN , 0 , '::1 ' );
432436 $ response ->answers [] = new Record ('igor.io ' , Message::TYPE_TXT , Message::CLASS_IN , 0 , array ('hello ' , 'world ' ));
437+ $ response ->answers [] = new Record ('igor.io ' , Message::TYPE_SPF , Message::CLASS_IN , 0 , array ('v=spf1 -all ' ));
433438 $ response ->answers [] = new Record ('igor.io ' , Message::TYPE_MX , Message::CLASS_IN , 0 , array ('priority ' => 0 , 'target ' => '' ));
434439 $ response ->answers [] = new Record ('igor.io ' , Message::TYPE_CAA , Message::CLASS_IN , 0 , array ('flag ' => 0 , 'tag ' => 'issue ' , 'value ' => 'letsencrypt.org ' ));
435440 $ response ->answers [] = new Record ('igor.io ' , Message::TYPE_SSHFP , Message::CLASS_IN , 0 , array ('algorithm ' => 1 , 'type ' => '1 ' , 'fingerprint ' => '69ac090c ' ));
0 commit comments