Пример #1
0
 public function testRenderNumberInput()
 {
     $age = new Number('age');
     $expected = '<input type="number" name="age">';
     $result = $age->render();
     $this->assertEquals($expected, $result);
 }
Пример #2
0
 public function number($name)
 {
     $number = new Number($name);
     if (!is_null($value = $this->getValueFor($name))) {
         $number->value($value);
     }
     return $number;
 }