Merge branch 'master' into nested-higher-order-expectations

# Conflicts:
#	tests/.snapshots/success.txt
This commit is contained in:
luke
2021-06-18 21:49:05 +01:00
6 changed files with 33 additions and 6 deletions

View File

@ -0,0 +1,14 @@
<?php
use PHPUnit\Framework\ExpectationFailedException;
test('it properly parses json string', function () {
expect('{"name":"Nuno"}')
->json()
->name
->toBe('Nuno');
});
test('fails with broken json string', function () {
expect('{":"Nuno"}')->json();
})->throws(ExpectationFailedException::class);