parent::
setUp();
$this->profiler =
$this->
createMock(Profiler::
class);
$twigEnvironment =
$this->
mockTwigEnvironment();
$templates =
[ 'data_collector.foo' =>
['foo', '@Foo/Collector/foo.html.twig'
],
'data_collector.bar' =>
['bar', '@Foo/Collector/bar.html.twig'
],
'data_collector.baz' =>
['baz', '@Foo/Collector/baz.html.twig'
],
];
$this->templateManager =
new TemplateManager($this->profiler,
$twigEnvironment,
$templates);
} public function testGetNameOfInvalidTemplate() { $this->
expectException(NotFoundHttpException::
class);
$this->templateManager->
getName(new Profile('token'
), 'notexistingpanel'
);
} /**
* if template exists in both profile and profiler then its name should be returned.
*/