From 959c9810deeab01746b96b9b79550fbdeacfbebe Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Tue, 25 Aug 2020 22:46:35 +0200 Subject: [PATCH] Add missing tests. --- spec/loophp/collection/CollectionSpec.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/spec/loophp/collection/CollectionSpec.php b/spec/loophp/collection/CollectionSpec.php index 8b72d4b96..ecdef482e 100644 --- a/spec/loophp/collection/CollectionSpec.php +++ b/spec/loophp/collection/CollectionSpec.php @@ -1852,6 +1852,14 @@ public function it_can_truthy(): void $this::fromIterable([true, false, true]) ->truthy() ->shouldReturn(false); + + $this::fromIterable([1, 2, 3]) + ->truthy() + ->shouldReturn(true); + + $this::fromIterable([1, 2, 3, 0]) + ->truthy() + ->shouldReturn(false); } public function it_can_unpack(): void @@ -1969,6 +1977,10 @@ public function it_can_use_range_with_value_1(): void { $this::range(0, 1) ->shouldIterateAs([(float) 0]); + + $this::range() + ->limit(5) + ->shouldIterateAs([(float) 0, (float) 1, (float) 2, (float) 3, (float) 4]); } public function it_can_use_times_with_a_callback(): void