예제 #1
0
 public function testGetDigits()
 {
     $bag = new ParameterBag(array('word' => 'foo_BAR_012'));
     $this->assertEquals('012', $bag->getDigits('word'), '->getDigits() gets only digits as string');
     $this->assertEquals('', $bag->getDigits('unknown'), '->getDigits() returns empty string if a parameter is not defined');
 }