Skip to content

Commit c639445

Browse files
committed
Update ResponseFactoryTest.php
1 parent 4905907 commit c639445

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/ResponseFactoryTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,18 @@ public function test_can_create_deferred_prop(): void
172172
});
173173

174174
$this->assertInstanceOf(DeferProp::class, $deferredProp);
175+
$this->assertSame($deferredProp->group(), 'default');
176+
}
177+
178+
public function test_can_create_deferred_prop_with_custom_group(): void
179+
{
180+
$factory = new ResponseFactory();
181+
$deferredProp = $factory->defer(function () {
182+
return 'A deferred value';
183+
}, 'foo');
184+
185+
$this->assertInstanceOf(DeferProp::class, $deferredProp);
186+
$this->assertSame($deferredProp->group(), 'foo');
175187
}
176188

177189
public function test_can_create_merged_prop(): void

0 commit comments

Comments
 (0)