mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
Reimplements non-callable sequence values.
This commit is contained in:
@ -44,3 +44,19 @@ test('it works with associative arrays', function () {
|
||||
function ($expectation, $key) { $expectation->toEqual('boom'); $key->toEqual('baz'); },
|
||||
);
|
||||
});
|
||||
|
||||
test('it can be passed non-callable values', function () {
|
||||
expect(['foo', 'bar', 'baz'])->sequence('foo', 'bar', 'baz');
|
||||
|
||||
expect(static::getCount())->toBe(3);
|
||||
});
|
||||
|
||||
test('it can be passed a mixture of value types', function () {
|
||||
expect(['foo', 'bar', 'baz'])->sequence(
|
||||
'foo',
|
||||
function ($expectation) { $expectation->toEqual('bar')->toBeString(); },
|
||||
'baz'
|
||||
);
|
||||
|
||||
expect(static::getCount())->toBe(4);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user