We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a12628a commit 869ab67Copy full SHA for 869ab67
tests/Feature/SharedStateTest.php
@@ -182,3 +182,20 @@
182
],
183
]);
184
});
185
+
186
+it('sets the shared state at the correct time when the builder is used', function () {
187
+ $cat = Cat::factory()->new()->createOne();
188
+ $dog = Dog::factory()->new()->createOne();
189
190
+ expect(ActiveState::getShared())->toBe(app(StateRegistry::class)->getDefaultState());
191
192
+ $builder = CatResource::state('table');
193
194
+ DogResource::make($dog);
195
196
197
198
+ $builder->make($cat);
199
200
+ expect(ActiveState::getShared())->toBe('table');
201
+});
0 commit comments