Twig_Environment::disableDebug PHP Method

disableDebug() public method

Disables debugging mode.
public disableDebug ( )
    public function disableDebug()
    {
        $this->debug = false;
    }

Usage Example

 public function testOutput()
 {
     $this->fieldDescription->expects($this->any())->method('getTemplate')->will($this->returnValue('SonataAdminBundle:CRUD:base_list_field.html.twig'));
     $this->fieldDescription->expects($this->any())->method('getFieldName')->will($this->returnValue('fd_name'));
     $this->environment->disableDebug();
     $parameters = array('admin' => $this->admin, 'value' => 'foo', 'field_description' => $this->fieldDescription, 'object' => $this->object);
     $template = $this->environment->loadTemplate('SonataAdminBundle:CRUD:base_list_field.html.twig');
     $this->assertSame('<td class="sonata-ba-list-field sonata-ba-list-field-" objectId="12345"> foo </td>', trim(preg_replace('/\\s+/', ' ', $this->twigExtension->output($this->fieldDescription, $template, $parameters))));
     $this->environment->enableDebug();
     $this->assertSame('<!-- START fieldName: fd_name template: SonataAdminBundle:CRUD:base_list_field.html.twig compiled template: SonataAdminBundle:CRUD:base_list_field.html.twig --> <td class="sonata-ba-list-field sonata-ba-list-field-" objectId="12345"> foo </td> <!-- END - fieldName: fd_name -->', trim(preg_replace('/\\s+/', ' ', $this->twigExtension->output($this->fieldDescription, $template, $parameters))));
 }
All Usage Examples Of Twig_Environment::disableDebug