public function testRange() { $item = $this->form->addRange('range', "Range", 2, 0, 20); $this->assertInstanceOf('Nette\Forms\Controls\TextInput', $item, 'is Nette\Forms\Controls\TextInput'); $this->assertEquals("range", $item->control->type, "range 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"); }