public function testNumber() { $item = $this->form->addNumber('number', "Number", 2, 0, 20); $this->assertInstanceOf('Nette\Forms\Controls\TextInput', $item, 'is Nette\Forms\Controls\TextInput'); $this->assertEquals("number", $item->control->type, "number type"); $this->assertEquals(0, $item->control->min, "min"); $this->assertEquals(20, $item->control->max, "max"); $this->assertEquals(2, $item->control->step, "step"); $this->assertTrue($this->isRuleExist($item, Form::NUMERIC), "Form::NUMERIC after Form::FILLED"); $this->assertTrue($this->isRuleExist($item, Form::RANGE), "Form::RANGE after Form::FILLED"); }