'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.
*/
public function testGetNameValidTemplate() { $this->profiler->
expects($this->
any()) ->
method('has'
) ->
withAnyParameters() ->
willReturnCallback($this->
profilerHasCallback(...
));