@@ -26,13 +26,6 @@ foreach($types as $type) {
26
26
$ tests [] = array ("binary " => $ binary );
27
27
}
28
28
29
- throws (function () use ($ classname ) {
30
- $ b = new $ classname ("random binary data without type " );
31
- echo "FAIL: Constructed BSON\Binary without type! \n" ;
32
- }, "MongoDB \\Driver \\Exception \\InvalidArgumentException " );
33
-
34
-
35
-
36
29
foreach ($ tests as $ n => $ test ) {
37
30
$ s = fromPHP ($ test );
38
31
echo "Test# {$ n } " , $ json = toJSON ($ s ), "\n" ;
@@ -41,9 +34,6 @@ foreach($tests as $n => $test) {
41
34
var_dump (toJSON (fromPHP ($ test )), toJSON (fromPHP ($ testagain )));
42
35
var_dump ((object )$ test == (object )$ testagain );
43
36
}
44
-
45
- $ binary ->getData (2 );
46
- $ binary ->getType (2 );
47
37
?>
48
38
===DONE===
49
39
<?php exit (0 ); ?>
@@ -64,7 +54,6 @@ bool(true)
64
54
bool(true)
65
55
bool(true)
66
56
bool(true)
67
- OK: Got MongoDB\Driver\Exception\InvalidArgumentException
68
57
Test#0 { "binary" : { "$type" : "00", "$binary" : "cmFuZG9tIGJpbmFyeSBkYXRh" } }
69
58
string(73) "{ "binary" : { "$type" : "00", "$binary" : "cmFuZG9tIGJpbmFyeSBkYXRh" } }"
70
59
string(73) "{ "binary" : { "$type" : "00", "$binary" : "cmFuZG9tIGJpbmFyeSBkYXRh" } }"
@@ -97,8 +86,4 @@ Test#7 { "binary" : { "$type" : "85", "$binary" : "cmFuZG9tIGJpbmFyeSBkYXRh" } }
97
86
string(73) "{ "binary" : { "$type" : "85", "$binary" : "cmFuZG9tIGJpbmFyeSBkYXRh" } }"
98
87
string(73) "{ "binary" : { "$type" : "85", "$binary" : "cmFuZG9tIGJpbmFyeSBkYXRh" } }"
99
88
bool(true)
100
-
101
- Warning: %s\Binary::getData() expects exactly 0 parameters, 1 given in %s on line %d
102
-
103
- Warning: %s\Binary::getType() expects exactly 0 parameters, 1 given in %s on line %d
104
89
===DONE===
0 commit comments