diff --git a/src/Symfony/Component/VarDumper/Tests/Dumper/HtmlDumperTest.php b/src/Symfony/Component/VarDumper/Tests/Dumper/HtmlDumperTest.php
index ae4ee8e6cc..4a8ffdfceb 100644
--- a/src/Symfony/Component/VarDumper/Tests/Dumper/HtmlDumperTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Dumper/HtmlDumperTest.php
@@ -12,6 +12,7 @@
namespace Symfony\Component\VarDumper\Tests\Dumper;
use PHPUnit\Framework\TestCase;
+use Symfony\Component\VarDumper\Caster\ImgStub;
use Symfony\Component\VarDumper\Cloner\VarCloner;
use Symfony\Component\VarDumper\Dumper\HtmlDumper;
@@ -160,4 +161,27 @@ EOTXT
$out
);
}
+
+ /**
+ * @dataProvider varToDumpProvider
+ */
+ public function testDumpString($var, $needle)
+ {
+ $dumper = new HtmlDumper();
+ $cloner = new VarCloner();
+
+ ob_start();
+ $dumper->dump($cloner->cloneVar($var));
+ $out = ob_get_clean();
+
+ $this->assertStringContainsString($needle, $out);
+ }
+
+ public function varToDumpProvider()
+ {
+ return [
+ [['dummy' => new ImgStub('dummy', 'img/png', '100em')], '
'],
+ ['foo', 'foo'],
+ ];
+ }
}