File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
tests/DependencyInjection Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -78,4 +78,40 @@ public function testBatchLoadFnNotCallable()
7878 $ this ->container
7979 );
8080 }
81+
82+ public function testLoadsValidConfiguration ()
83+ {
84+ $ this ->extension ->load (
85+ [
86+ [
87+ 'defaults ' => [
88+ 'promise_adapter ' => 'overblog_dataloader.react_promise_adapter ' ,
89+ ],
90+ 'loaders ' => [
91+ 'users ' => [
92+ 'alias ' => 'users_loader ' ,
93+ 'batch_load_fn ' => '@app.user:getUsers ' ,
94+ ],
95+ 'posts ' => [
96+ 'batch_load_fn ' => 'Post::getPosts ' ,
97+ 'options ' => [
98+ 'max_batch_size ' => 15 ,
99+ 'batch ' => false ,
100+ 'cache ' => false ,
101+ 'cache_map ' => 'app.cache.map ' ,
102+ 'cache_key_fn ' => '@app.cache ' ,
103+ ],
104+ ],
105+ 'images ' => [
106+ 'factory ' => 'dataloader_factory ' ,
107+ 'batch_load_fn ' => 'Image\Loader::get ' ,
108+ ],
109+ ],
110+ ],
111+ ],
112+ $ this ->container
113+ );
114+
115+ $ this ->assertInstanceOf (ContainerBuilder::class, $ this ->container );
116+ }
81117}
You can’t perform that action at this time.
0 commit comments