File tree Expand file tree Collapse file tree 2 files changed +11
-15
lines changed Expand file tree Collapse file tree 2 files changed +11
-15
lines changed Original file line number Diff line number Diff line change @@ -254,13 +254,11 @@ public function testEmptySizeCategoriesUpdate(): void
254254 // Clear existing config first to test empty array validation
255255 $ configProperty = $ this ->reflection ->getProperty ('config ' );
256256 $ configProperty ->setAccessible (true );
257- $ configProperty ->setValue (
258- [
259- 'max_pool_size ' => 50 ,
260- 'default_capacity ' => 4096 ,
261- 'size_categories ' => [] // Start with empty
262- ]
263- );
257+ $ configProperty ->setValue (null , [
258+ 'max_pool_size ' => 50 ,
259+ 'default_capacity ' => 4096 ,
260+ 'size_categories ' => [] // Start with empty
261+ ]);
264262
265263 // Should fail validation when trying to configure with empty array
266264 $ this ->expectException (\InvalidArgumentException::class);
@@ -283,7 +281,7 @@ public function testNullSafetyInMerge(): void
283281 $ configProperty ->setAccessible (true );
284282 $ config = $ configProperty ->getValue ();
285283 unset($ config ['size_categories ' ]);
286- $ configProperty ->setValue ($ config );
284+ $ configProperty ->setValue (null , $ config );
287285
288286 // This should not crash even if size_categories is missing
289287 JsonBufferPool::configure (
Original file line number Diff line number Diff line change @@ -121,13 +121,11 @@ public function testSizeCategoriesEmptyArrayInvalid(): void
121121 $ reflection = new \ReflectionClass (JsonBufferPool::class);
122122 $ configProperty = $ reflection ->getProperty ('config ' );
123123 $ configProperty ->setAccessible (true );
124- $ configProperty ->setValue (
125- [
126- 'max_pool_size ' => 50 ,
127- 'default_capacity ' => 4096 ,
128- 'size_categories ' => []
129- ]
130- );
124+ $ configProperty ->setValue (null , [
125+ 'max_pool_size ' => 50 ,
126+ 'default_capacity ' => 4096 ,
127+ 'size_categories ' => []
128+ ]);
131129
132130 $ this ->expectException (InvalidArgumentException::class);
133131 $ this ->expectExceptionMessage ("'size_categories' cannot be empty " );
You can’t perform that action at this time.
0 commit comments