diff --git a/Tests/Unit/ViewHelpers/Format/ReplaceViewHelperTest.php b/Tests/Unit/ViewHelpers/Format/ReplaceViewHelperTest.php index 908526359..5c2a98fc3 100644 --- a/Tests/Unit/ViewHelpers/Format/ReplaceViewHelperTest.php +++ b/Tests/Unit/ViewHelpers/Format/ReplaceViewHelperTest.php @@ -10,6 +10,7 @@ use FluidTYPO3\Vhs\Tests\Unit\ViewHelpers\AbstractViewHelperTest; use FluidTYPO3\Vhs\Tests\Unit\ViewHelpers\AbstractViewHelperTestCase; +use TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\TextNode; class ReplaceViewHelperTest extends AbstractViewHelperTestCase { @@ -24,6 +25,16 @@ public function testCanReplace(): void $this->assertSame('bar', $test); } + public function testCanReplaceWithChildContent(): void + { + $arguments = [ + 'substring' => 'foo', + 'replacement' => '', + ]; + $test = $this->executeViewHelper($arguments, [], new TextNode('foobar')); + $this->assertSame('bar', $test); + } + public function testCanReplaceWithArrays(): void { $arguments = [