mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
Merge branch 'master' into higher-order-tap-and-defer
# Conflicts: # tests/.snapshots/success.txt
This commit is contained in:
@ -116,6 +116,7 @@
|
||||
PASS Tests\Features\Expect\HigherOrder\methodsAndProperties
|
||||
✓ it can access methods and properties
|
||||
✓ it can handle nested methods and properties
|
||||
✓ it can start a new higher order expectation using the and syntax
|
||||
|
||||
PASS Tests\Features\Expect\HigherOrder\properties
|
||||
✓ it allows properties to be accessed from the value
|
||||
@ -409,8 +410,6 @@
|
||||
PASS Tests\Features\HigherOrderTests
|
||||
✓ it proxies calls to object
|
||||
✓ it is capable doing multiple assertions
|
||||
✓ it can tap into the test
|
||||
✓ it can use the returned instance from a tap
|
||||
|
||||
WARN Tests\Features\Incompleted
|
||||
… incompleted
|
||||
@ -580,5 +579,5 @@
|
||||
✓ it is a test
|
||||
✓ it uses correct parent class
|
||||
|
||||
Tests: 4 incompleted, 7 skipped, 364 passed
|
||||
Tests: 4 incompleted, 7 skipped, 363 passed
|
||||
|
||||
@ -22,6 +22,17 @@ it('can handle nested methods and properties', function () {
|
||||
->newInstance()->books()->toBeArray();
|
||||
});
|
||||
|
||||
it('can start a new higher order expectation using the and syntax', function () {
|
||||
expect(new HasMethodsAndProperties())
|
||||
->toBeInstanceOf(HasMethodsAndProperties::class)
|
||||
->meta->toBeArray
|
||||
->and(['foo' => 'bar'])
|
||||
->toBeArray()
|
||||
->foo->toEqual('bar');
|
||||
|
||||
expect(static::getCount())->toEqual(4);
|
||||
});
|
||||
|
||||
class HasMethodsAndProperties
|
||||
{
|
||||
public $name = 'Has Methods and Properties';
|
||||
|
||||
Reference in New Issue
Block a user