Skip to content

Commit c6cd924

Browse files
Remove deprecated calls to deprecated methods of SplObjectStorage
1 parent 3958048 commit c6cd924

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tests/Caster/SplCasterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public static function provideCastSplDoublyLinkedList()
148148
public function testCastObjectStorageIsntModified()
149149
{
150150
$var = new \SplObjectStorage();
151-
$var->attach(new \stdClass());
151+
$var[new \stdClass()] = null;
152152
$var->rewind();
153153
$current = $var->current();
154154

@@ -159,7 +159,7 @@ public function testCastObjectStorageIsntModified()
159159
public function testCastObjectStorageDumpsInfo()
160160
{
161161
$var = new \SplObjectStorage();
162-
$var->attach(new \stdClass(), new \DateTimeImmutable());
162+
$var[new \stdClass()] = new \DateTimeImmutable();
163163

164164
$this->assertDumpMatchesFormat('%ADateTimeImmutable%A', $var);
165165
}

0 commit comments

Comments
 (0)