$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'
);
$this->
assertSame(0,
$extension->
renderVar(0
), 'TwigExtension::renderVar() renders zero correctly when provided as an integer.'
);
$this->
assertSame(0,
$extension->
renderVar(0.0
), 'TwigExtension::renderVar() renders zero correctly when provided as a double.'
);
} /**
* Tests the dump function.
*/
public function testDump() { // Test Twig Debug disabled.
$this->
drupalGet('/twig-theme-test/dump'
);
$this->
assertSession()->
elementsCount('css', '.sf-dump', 0
);