mirror of
https://github.com/pestphp/pest.git
synced 2026-03-11 02:07:23 +01:00
test
This commit is contained in:
@ -79,11 +79,13 @@ it('can add expectations via "and"', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('accepts callables', 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)->toBeInstanceOf(Expectation::class);
|
||||||
expect($number->value)->toBeInt();
|
expect($number->value)->toBeInt();
|
||||||
$number->toBeInt->not->toBeString;
|
$number->toBeInt->not->toBeString;
|
||||||
|
|
||||||
|
expect($key)->toBeInt();
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(static::getCount())->toBe(12);
|
expect(static::getCount())->toBe(15);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user