You are here

public function ParameterBagTest::testGetAlpha 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::testGetAlpha()

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

File

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

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');
}