Skip to content

Commit ec942b1

Browse files
authored
Replace duplicate AssertableJson test with new one (#42459)
1 parent 57c24bf commit ec942b1

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

tests/Testing/Fluent/AssertTest.php

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -362,17 +362,22 @@ public function testAssertWhereMatchesValueUsingArrayable()
362362
public function testAssertWhereMatchesValueUsingArrayableWhenSortedDifferently()
363363
{
364364
$assert = AssertableJson::fromArray([
365-
'bar' => [
366-
'baz' => 'foo',
367-
'example' => 'value',
365+
'data' => [
366+
'status' => 200,
367+
'user' => [
368+
'id' => 1,
369+
'name' => 'Taylor',
370+
],
368371
],
369372
]);
370373

371-
$assert->where('bar', function ($value) {
372-
$this->assertInstanceOf(Collection::class, $value);
373-
374-
return $value->count() === 2;
375-
});
374+
$assert->where('data', [
375+
'user' => [
376+
'name' => 'Taylor',
377+
'id' => 1,
378+
],
379+
'status' => 200,
380+
]);
376381
}
377382

378383
public function testAssertWhereFailsWhenDoesNotMatchValueUsingArrayable()

0 commit comments

Comments
 (0)