/**
* @internal
*
* @covers \Shopware\Core\Framework\Adapter\Twig\Filter\ReplaceRecursiveFilter
*/
class ReplaceRecursiveFilterTest extends TestCase
{ public function testReplace(): void
{ $env =
new Environment(new ArrayLoader(['test' => '{{ {"berries": ["blueberry"]}|replace_recursive({"berries": ["strawberry", "blackberry"]})|json_encode|raw }}'
]));
$env->
addExtension(new ReplaceRecursiveFilter());
static::
assertSame('{"berries":["strawberry","blackberry"]}',
$env->
render('test'
));
}}