Started fixing tests for the TocGenerator

Этот коммит содержится в:
Casey McLaughlin
2015-01-22 15:30:01 -05:00
родитель aa158141ea
Коммит 5968cfef3e
8 изменённых файлов: 188 добавлений и 892 удалений

Просмотреть файл

@@ -58,14 +58,14 @@ class TocTwigExtension extends Twig_Extension
$functions[] = new \Twig_SimpleFunction('toc', function($markup, $top = 1, $depth = 2, $titleTemplate = null) {
return ($titleTemplate)
? $this->generator->getHtmlItems($markup, $top, $depth, $titleTemplate)
: $this->generator->getHtmlItems($markup, $top, $depth);
? $this->generator->getHtmlMenu($markup, $top, $depth, $titleTemplate)
: $this->generator->getHtmlMenu($markup, $top, $depth);
}, ['is_safe' => ['html']]);
// ~~~
$functions[] = new \Twig_SimpleFunction('toc_items', function($markup, $top = 1, $depth = 2) {
return $this->generator->getItems($markup, $top, $depth);
return $this->generator->getMenu($markup, $top, $depth);
});
return $functions;
@@ -82,4 +82,4 @@ class TocTwigExtension extends Twig_Extension
{
return 'toc';
}
}
}