public function testGetFunctions()
 {
     $functions = $this->extension->getFunctions();
     $this->assertCount(1, $functions);
     /** @var \Twig_SimpleFunction $function */
     $function = current($functions);
     $this->assertInstanceOf('\\Twig_SimpleFunction', $function);
     $this->assertEquals('has_workflows', $function->getName());
     $this->assertEquals(array($this->extension, 'hasWorkflows'), $function->getCallable());
 }
 public function testGetFunctions()
 {
     $functions = $this->extension->getFunctions();
     $this->assertCount(4, $functions);
     $expectedFunctions = array('has_workflow', 'has_workflow_start_step', 'has_workflow_item', 'is_workflow_reset_allowed');
     /** @var \Twig_SimpleFunction $function */
     foreach ($functions as $function) {
         $this->assertInstanceOf('\\Twig_SimpleFunction', $function);
         $this->assertContains($function->getName(), $expectedFunctions);
     }
 }