Esempio n. 1
0
 /**
  * @covers Xoops\Form\Element::renderValidationJS
  * @covers Xoops\Form\Element::addCustomValidationCode
  */
 public function testRenderValidationJS()
 {
     $value = $this->object->renderValidationJS();
     $this->assertFalse($value);
     $this->object->setRequired();
     $this->object->setName('rendertest');
     $value = $this->object->renderValidationJS();
     $this->assertNotFalse($value);
     $this->object->remove('required');
     $this->object->addCustomValidationCode('');
     $value = $this->object->renderValidationJS();
     $this->assertEquals($value, '');
     $this->object->addCustomValidationCode('');
     $value = $this->object->renderValidationJS();
     $this->assertEquals($value, "\n");
     $this->object->addCustomValidationCode('', true);
     $value = $this->object->renderValidationJS();
     $this->assertEquals($value, '');
 }
Esempio n. 2
0
 /**
  * @covers Xoops\Form\Element::renderValidationJS
  */
 public function testRenderValidationJS()
 {
     $value = $this->object->renderValidationJS();
     $this->assertFalse($value);
 }