mirror of
https://github.com/pestphp/pest.git
synced 2026-03-11 18:27:23 +01:00
Add test for and()
This commit is contained in:
@ -48,6 +48,15 @@ it('can start a new higher order expectation using the and syntax in higher orde
|
|||||||
->toBeArray()
|
->toBeArray()
|
||||||
->foo->toEqual('bar');
|
->foo->toEqual('bar');
|
||||||
|
|
||||||
|
it('can start a new higher order expectation using the and syntax without nesting expectations', function () {
|
||||||
|
expect(new HasMethodsAndProperties())
|
||||||
|
->toBeInstanceOf(HasMethodsAndProperties::class)
|
||||||
|
->meta
|
||||||
|
->sequence(
|
||||||
|
function ($value, $key) { $value->toBeArray()->and($key)->toBe('foo'); },
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
class HasMethodsAndProperties
|
class HasMethodsAndProperties
|
||||||
{
|
{
|
||||||
public $name = 'Has Methods and Properties';
|
public $name = 'Has Methods and Properties';
|
||||||
|
|||||||
Reference in New Issue
Block a user