1<?php
2
3/*
4 * This file is part of Twig.
5 *
6 * (c) Fabien Potencier
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12use Twig\Profiler\Dumper\HtmlDumper;
13
14class Twig_Tests_Profiler_Dumper_HtmlTest extends Twig_Tests_Profiler_Dumper_AbstractTest
15{
16    public function testDump()
17    {
18        $dumper = new HtmlDumper();
19        $this->assertStringMatchesFormat(<<<EOF
20<pre>main <span style="color: #d44">%d.%dms/%d%</span>
21└ <span style="background-color: #ffd">index.twig</span> <span style="color: #d44">%d.%dms/%d%</span>
22  └ embedded.twig::block(<span style="background-color: #dfd">body</span>)
23  └ <span style="background-color: #ffd">embedded.twig</span>
24  │ └ <span style="background-color: #ffd">included.twig</span>
25  └ index.twig::macro(<span style="background-color: #ddf">foo</span>)
26  └ <span style="background-color: #ffd">embedded.twig</span>
27    └ <span style="background-color: #ffd">included.twig</span>
28</pre>
29EOF
30        , $dumper->dump($this->getProfile()));
31    }
32}
33