@@ -294,12 +294,10 @@ public function test_auto_sizes_update_content_img_tag( string $input, string $e
294
294
*/
295
295
public function test_auto_sizes_attribute_includes_valid_auto (): void {
296
296
// Test when 'auto' is the first item in the list.
297
- $ sizes_attr = 'auto, 100vw ' ;
298
- $ this ->assertTrue ( auto_sizes_attribute_includes_valid_auto ( $ sizes_attr ) );
297
+ $ this ->assertTrue ( auto_sizes_attribute_includes_valid_auto ( 'auto, 100vw ' ) );
299
298
300
299
// Test when 'auto' is not the first item in the list.
301
- $ sizes_attr = '100vw, auto ' ;
302
- $ this ->assertFalse ( auto_sizes_attribute_includes_valid_auto ( $ sizes_attr ) );
300
+ $ this ->assertFalse ( auto_sizes_attribute_includes_valid_auto ( '100vw, auto ' ) );
303
301
}
304
302
305
303
/**
@@ -366,11 +364,11 @@ public function test_auto_sizes_update_image_attributes( array $attr, array $exp
366
364
*/
367
365
public function test_auto_sizes_update_content_img_tag_non_string_input (): void {
368
366
/*
369
- These tests are separate from the data provider approach because the function
370
- auto_sizes_update_content_img_tag() expects a string as an argument. Passing a non-string
371
- value would cause a TypeError. These tests ensure that the function behaves as expected
372
- when it receives non-string inputs.
373
- */
367
+ * These tests are separate from the data provider approach because the function
368
+ * auto_sizes_update_content_img_tag() expects a string as an argument. Passing a non-string
369
+ * value would cause a TypeError. These tests ensure that the function behaves as expected
370
+ * when it receives non-string inputs.
371
+ */
374
372
$ this ->assertSame ( '' , auto_sizes_update_content_img_tag ( array () ) );
375
373
}
376
374
@@ -379,12 +377,12 @@ public function test_auto_sizes_update_content_img_tag_non_string_input(): void
379
377
*/
380
378
public function test_auto_sizes_update_image_attributes_with_null_input (): void {
381
379
/*
382
- This test is separate because the main test method uses a data provider
383
- that expects the $attr parameter to be an array. Passing null directly
384
- would cause a TypeError due to the type hint. By testing null separately,
385
- we ensure that the function can handle null inputs gracefully without
386
- modifying the type hint in the main test method.
387
- */
380
+ * This test is separate because the main test method uses a data provider
381
+ * that expects the $attr parameter to be an array. Passing null directly
382
+ * would cause a TypeError due to the type hint. By testing null separately,
383
+ * we ensure that the function can handle null inputs gracefully without
384
+ * modifying the type hint in the main test method.
385
+ */
388
386
$ this ->assertSame ( array (), auto_sizes_update_image_attributes ( null ) );
389
387
}
390
388
}
0 commit comments