Commit 6b912623 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Refactorisation de l'aide de vue FilAriane pour les tests unitaires.

parent 57109fd9
......@@ -17,26 +17,32 @@ class FilAriane extends Breadcrumbs
*/
public function __construct()
{
$this->setRenderInvisible(true)
->setMinDepth(0);
$this
->setRenderInvisible(true)
->setMinDepth(0);
}
/**
* Renders helper
*
* @param AbstractContainer $container [optional] container to render. Default is
* to render the container registered in the helper.
* @return string helper output
* {@inheritdoc}
*/
public function render($container = null)
{
$html = parent::render($container);
$html = $this->parentRender($container);
if ($html === '') {
return '';
}
$html = sprintf('<ul class="breadcrumb"><li>%s</li></ul>', $html);
return $html;
return sprintf('<ul class="breadcrumb"><li>%s</li></ul>', $html);
}
/**
* Méthode extraite pour permettre les tests unitaires.
*
* @param string|AbstractContainer $container
* @return string
*/
protected function parentRender($container = null)
{
return parent::render($container);
}
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment