|
41 | 41 | // Unknown attributes. |
42 | 42 | assertType('array<string, mixed>|string', $switcher->the_languages($link, $array)); |
43 | 43 |
|
44 | | -// With unknown variable merged. |
| 44 | +// With raw attribute set to true and merged into an array. |
45 | 45 | $args = array_merge( $array, [ 'raw' => 1 ] ); |
46 | 46 | assertType('array<string, mixed>', $switcher->the_languages($link, $args)); |
47 | 47 |
|
| 48 | +// With raw attribute set to true and merged with an array. |
| 49 | +$args = array_merge( [ 'raw' => true ], $array ); |
| 50 | +assertType('array<string, mixed>|string', $switcher->the_languages($link, $args)); |
| 51 | + |
48 | 52 | // With raw attribute set to true outside. |
49 | 53 | $array['raw'] = 1; |
50 | 54 | assertType('array<string, mixed>', $switcher->the_languages($link, $array)); |
| 55 | + |
| 56 | +// With raw attribute set to false outside. |
| 57 | +$array['raw'] = false; |
| 58 | +assertType('string', $switcher->the_languages($link, $array)); |
| 59 | + |
| 60 | +// With raw attribute set to false and merged in an array. |
| 61 | +$args = array_merge( $array, [ 'raw' => false ] ); |
| 62 | +assertType('string', $switcher->the_languages($link, $array)); |
| 63 | + |
| 64 | +// With raw attribute set to false and merged with an array. |
| 65 | +$args = array_merge( [ 'raw' => false ], $array ); |
| 66 | +assertType('string', $switcher->the_languages($link, $array)); |
0 commit comments