Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / symfony / var-dumper / Tests / Caster / SplCasterTest.php
index e2181d90b5b1dfc7b58c47193d25fd1e8f230ba1..48531562de677bd0ce80c5bcc3b76cf545f5f68d 100644 (file)
@@ -144,4 +144,23 @@ EOTXT;
             array(\SplDoublyLinkedList::IT_MODE_LIFO | \SplDoublyLinkedList::IT_MODE_DELETE, 'IT_MODE_LIFO | IT_MODE_DELETE'),
         );
     }
+
+    public function testCastObjectStorageIsntModified()
+    {
+        $var = new \SplObjectStorage();
+        $var->attach(new \stdClass());
+        $var->rewind();
+        $current = $var->current();
+
+        $this->assertDumpMatchesFormat('%A', $var);
+        $this->assertSame($current, $var->current());
+    }
+
+    public function testCastObjectStorageDumpsInfo()
+    {
+        $var = new \SplObjectStorage();
+        $var->attach(new \stdClass(), new \DateTime());
+
+        $this->assertDumpMatchesFormat('%ADateTime%A', $var);
+    }
 }