slug() public method

See also: Bolt\Twig\Handler\TextHandler::slug()
public slug ( $str )
Example #1
0
 public function testSlug()
 {
     $app = $this->getApp();
     $handlers = $this->getTwigHandlers($app);
     $handlers['text'] = $this->getMockHandler('TextHandler', 'slug');
     $twig = new TwigExtension($app, $handlers, true);
     $twig->slug(null);
 }
Example #2
0
 public function testMarkdown()
 {
     $app = $this->getApp();
     $handlers = $this->getTwigHandlers($app);
     $twig = new TwigExtension($app, $handlers, false);
     $this->assertEquals('a-title-made-of-words', $twig->slug("A Title Made of Words"));
 }