public function testRender() { $form = new Form(); $tags = $form->addTags('tags')->setDefaultValue(NULL); $this->assertStringEqualsFile(E::dumpedFile('tagsNull'), $tags->getControl()); $tags = $form->addTags('tagsTwo')->setDefaultValue(array('tag', 'one', 'two')); $this->assertStringEqualsFile(E::dumpedFile('tagsRender'), $tags->getControl()); }
public function testControl() { $form = new Form(); $recaptcha = new \WebChemistry\Forms\Controls\Recaptcha('aev464vaew8vaet8', 'a1evt88av18avte'); $form->addComponent($recaptcha, 'recaptcha'); $this->assertSame('aev464vaew8vaet8', $recaptcha->getApiKey()); $this->assertStringEqualsFile(E::dumpedFile('recaptcha'), $recaptcha->getControl()); }