public function ParameterBagTest::testGetInt in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/http-foundation/Tests/ParameterBagTest.php \Symfony\Component\HttpFoundation\Tests\ParameterBagTest::testGetInt()
@covers Symfony\Component\HttpFoundation\ParameterBag::getInt
File
- vendor/
symfony/ http-foundation/ Tests/ ParameterBagTest.php, line 180
Class
Namespace
Symfony\Component\HttpFoundation\TestsCode
public function testGetInt() {
$bag = new ParameterBag(array(
'digits' => '0123',
));
$this
->assertEquals(123, $bag
->getInt('digits'), '->getInt() gets a value of parameter as integer');
$this
->assertEquals(0, $bag
->getInt('unknown'), '->getInt() returns zero if a parameter is not defined');
}