]> granicus.if.org Git - php/commitdiff
ext/tidy: fix non-deterministic expected output in two tests.
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 10 Jun 2016 03:12:17 +0000 (23:12 -0400)
committerAnatol Belski <ab@php.net>
Mon, 11 Jul 2016 12:05:43 +0000 (14:05 +0200)
Some of the tidy tests expect output that can change. The motivating
example is an object "id" that is some integer, but no integer in
particular. Those hard-coded values have been changed to accept any
integer so that the test suite passes when tidy-html5 is used.

ext/tidy/tests/010.phpt
ext/tidy/tests/012.phpt

index 85d9df519020f107d9ecd286efc69885c589048a..695e1c9ce56f450a388baac14ec092addd41c379 100644 (file)
@@ -11,7 +11,7 @@ var_dump($a->html());
 var_dump($a->head());
 
 ?>
---EXPECT--
+--EXPECTF--
 object(tidyNode)#2 (8) {
   ["value"]=>
   string(94) "<html>
@@ -100,7 +100,7 @@ object(tidyNode)#2 (8) {
               ["proprietary"]=>
               bool(false)
               ["id"]=>
-              int(111)
+              int(%i)
               ["attribute"]=>
               NULL
               ["child"]=>
@@ -231,7 +231,7 @@ object(tidyNode)#2 (9) {
           ["proprietary"]=>
           bool(false)
           ["id"]=>
-          int(111)
+          int(%i)
           ["attribute"]=>
           NULL
           ["child"]=>
@@ -307,7 +307,7 @@ object(tidyNode)#2 (9) {
       ["proprietary"]=>
       bool(false)
       ["id"]=>
-      int(111)
+      int(%i)
       ["attribute"]=>
       NULL
       ["child"]=>
index 39ce22bec16720f6a62844355a1849be1c2c523d..e86aa6c45c290c110d6b49e938db394010133101 100644 (file)
@@ -30,7 +30,7 @@ Accessing children nodes
         dump_nodes($html);
             
 ?>
---EXPECT--
+--EXPECTF--
 bool(true)
 object(tidyNode)#3 (9) {
   ["value"]=>
@@ -70,7 +70,7 @@ object(tidyNode)#3 (9) {
       ["proprietary"]=>
       bool(false)
       ["id"]=>
-      int(111)
+      int(%i)
       ["attribute"]=>
       NULL
       ["child"]=>
@@ -94,7 +94,7 @@ object(tidyNode)#4 (9) {
   ["proprietary"]=>
   bool(false)
   ["id"]=>
-  int(111)
+  int(%i)
   ["attribute"]=>
   NULL
   ["child"]=>
@@ -222,7 +222,7 @@ object(tidyNode)#5 (9) {
           ["proprietary"]=>
           bool(false)
           ["id"]=>
-          int(114)
+          int(%i)
           ["attribute"]=>
           NULL
           ["child"]=>
@@ -365,7 +365,7 @@ object(tidyNode)#8 (9) {
       ["proprietary"]=>
       bool(false)
       ["id"]=>
-      int(114)
+      int(%i)
       ["attribute"]=>
       NULL
       ["child"]=>
@@ -426,7 +426,7 @@ object(tidyNode)#10 (9) {
   ["proprietary"]=>
   bool(false)
   ["id"]=>
-  int(114)
+  int(%i)
   ["attribute"]=>
   NULL
   ["child"]=>