File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,18 @@ $array = iterator_to_array($cursor);
18
18
$ date = $ utcdatetime ->toDateTime ();
19
19
var_dump ($ date ->format (DATE_RSS ));
20
20
21
+ throws (function () use ($ utcdatetime ) {
22
+ echo $ utcdatetime , "\n" ;
23
+ $ utcdatetime ->__toString (1 );
24
+ }, "InvalidArgumentException " );
25
+
26
+ throws (function () use ($ utcdatetime ) {
27
+ $ utcdatetime ->toDateTime (DATE_RSS );
28
+ }, "InvalidArgumentException " );
29
+
30
+ throws (function () {
31
+ $ d = new BSON \UTCDatetime ;
32
+ }, "InvalidArgumentException " );
21
33
22
34
$ tests = array (
23
35
array ($ utcdatetime ),
@@ -38,6 +50,10 @@ foreach($tests as $n => $test) {
38
50
<?php exit (0 ); ?>
39
51
--EXPECTF--
40
52
string(31) "Thu, 20 Nov 2014 01:03:31 +0000"
53
+ 1416445411987
54
+ OK: Got InvalidArgumentException
55
+ OK: Got InvalidArgumentException
56
+ OK: Got InvalidArgumentException
41
57
Test#0 { "0" : { "$date" : 1416445411987 } }
42
58
string(37) "{ "0" : { "$date" : 1416445411987 } }"
43
59
string(37) "{ "0" : { "$date" : 1416445411987 } }"
You can’t perform that action at this time.
0 commit comments