From b99c4d611bc87df7e978876124e8f180c6a8ea3f Mon Sep 17 00:00:00 2001 From: Dan Harrin Date: Thu, 20 Jan 2022 10:21:54 +0000 Subject: [PATCH] test --- tests/Features/Expect/each.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/Features/Expect/each.php b/tests/Features/Expect/each.php index 0f26a974..ad61f578 100644 --- a/tests/Features/Expect/each.php +++ b/tests/Features/Expect/each.php @@ -79,11 +79,13 @@ it('can add expectations via "and"', function () { }); it('accepts callables', function () { - expect([1, 2, 3])->each(function ($number) { + expect([1, 2, 3])->each(function ($number, $key) { expect($number)->toBeInstanceOf(Expectation::class); expect($number->value)->toBeInt(); $number->toBeInt->not->toBeString; + + expect($key)->toBeInt(); }); - expect(static::getCount())->toBe(12); + expect(static::getCount())->toBe(15); });