You are here

public function ParameterBagTest::testGetAlnum in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-foundation/Tests/ParameterBagTest.php \Symfony\Component\HttpFoundation\Tests\ParameterBagTest::testGetAlnum()

@covers Symfony\Component\HttpFoundation\ParameterBag::getAlnum

File

vendor/symfony/http-foundation/Tests/ParameterBagTest.php, line 158

Class

ParameterBagTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testGetAlnum() {
  $bag = new ParameterBag(array(
    'word' => 'foo_BAR_012',
  ));
  $this
    ->assertEquals('fooBAR012', $bag
    ->getAlnum('word'), '->getAlnum() gets only alphanumeric characters');
  $this
    ->assertEquals('', $bag
    ->getAlnum('unknown'), '->getAlnum() returns empty string if a parameter is not defined');
}