Merge branch 'master' into scoped

# Conflicts:
#	src/Expectations/HigherOrderExpectation.php
#	tests/Features/Expect/HigherOrder/methods.php
This commit is contained in:
Luke Downing
2022-01-23 23:44:04 +00:00
5 changed files with 34 additions and 9 deletions

View File

@ -91,8 +91,20 @@ it('can use the scoped method to lock into the given level for expectations', fu
);
});
it('works consistently with the json expectation method', function () {
expect(new HasMethods())
->jsonString()->json()->id->toBe(1)
->jsonString()->json()->name->toBe('Has Methods')->toBeString()
->jsonString()->json()->quantity->toBe(20)->toBeInt();
});
class HasMethods
{
public function jsonString(): string
{
return '{ "id": 1, "name": "Has Methods", "quantity": 20 }';
}
public function name()
{
return 'Has Methods';