/**
* Tests output of integer and double 0 values of TwigExtension::escapeFilter().
*
* @see https://www.drupal.org/node/2417733
*/
public function testsRenderEscapedZeroValue() { /** @var \Drupal\Core\Template\TwigExtension $extension */
$extension = \Drupal::
service('twig.extension'
);
/** @var \Drupal\Core\Template\TwigEnvironment $twig */
$twig = \Drupal::
service('twig'
);
$this->
assertSame(0,
$extension->
escapeFilter($twig, 0
), 'TwigExtension::escapeFilter() returns zero correctly when provided as an integer.'
);
$this->
assertSame(0,
$extension->
escapeFilter($twig, 0.0
), 'TwigExtension::escapeFilter() returns zero correctly when provided as a double.'
);
} /**
* Tests output of integer and double 0 values of TwigExtension->renderVar().
*
* @see https://www.drupal.org/node/2417733
*/
public function testsRenderZeroValue() { /** @var \Drupal\Core\Template\TwigExtension $extension */
$extension = \Drupal::
service('twig.extension'
);