diff --git a/tests/Support/SupportLazyCollectionIsLazyTest.php b/tests/Support/SupportLazyCollectionIsLazyTest.php index c523038c450c..82730fe587af 100644 --- a/tests/Support/SupportLazyCollectionIsLazyTest.php +++ b/tests/Support/SupportLazyCollectionIsLazyTest.php @@ -977,6 +977,17 @@ public function testSomeIsLazy() }); } + public function testSoleIsLazy() + { + $data = $this->make([['a' => 1], ['a' => 2], ['a' => 3]]); + + $this->assertEnumeratesCollection($data, 3, function ($collection) { + $collection->sole(function ($item) { + return $item['a'] === 2; + }); + }); + } + public function testSortIsLazy() { $this->assertDoesNotEnumerate(function ($collection) {