public function testRequiredInput() { $form = new Form(); $form->addInputText('city')->setRequired(true); $this->assertFalse($form->populate([])->isValid()); $this->assertFalse($form->populate(['city' => ''])->isValid()); $this->assertTrue($form->populate(['city' => 'London'])->isValid()); }