Skip to content

Commit

Permalink
Add tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
timvandijck committed Sep 8, 2023
1 parent 84b035d commit c872228
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/Support/PlainTextDumperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,21 @@
$result = PlainTextDumper::dump(true);
assertMatchesOsSafeSnapshot($result);
});

it('can handle circular references', function () {
class A {
public $b;
}

class B {
public $a;
}

$a = new A();
$b = new B();
$a->b = $b;
$b->a = $a;

$result = PlainTextDumper::dump($a);
assertMatchesOsSafeSnapshot($result);
});

0 comments on commit c872228

Please sign in to comment.