public function ParameterBagTest::testGetAlpha

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

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php, line 125

Class

ParameterBagTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

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