public function Twig_Tests_Extension_CoreTest::testRandomFunctionWithoutParameter in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/twig/twig/test/Twig/Tests/Extension/CoreTest.php \Twig_Tests_Extension_CoreTest::testRandomFunctionWithoutParameter()
File
- vendor/
twig/ twig/ test/ Twig/ Tests/ Extension/ CoreTest.php, line 60
Class
Code
public function testRandomFunctionWithoutParameter() {
$max = mt_getrandmax();
for ($i = 0; $i < 100; ++$i) {
$val = twig_random(new Twig_Environment($this
->getMock('Twig_LoaderInterface')));
$this
->assertTrue(is_int($val) && $val >= 0 && $val <= $max);
}
}