Example #1
0
 /**
  * @covers Xoops\Form\Form::getAction
  */
 public function testGetAction()
 {
     $name = 'form_name';
     $this->object->setAction($name);
     $value = $this->object->getAction();
     $this->assertSame($name, $value);
 }
Example #2
0
 public function testFormAttributes()
 {
     $this->assertEquals(Form::METHOD_POST, $this->object->getMethod());
     $this->object->setMethod(Form::METHOD_GET);
     $this->assertEquals(Form::METHOD_GET, $this->object->getMethod());
     $this->assertEquals(null, $this->object->getAction());
     $this->object->setAction('/some/url');
     $this->assertEquals('/some/url', $this->object->getAction());
     $this->assertFalse($this->object->isMultipart());
     $this->object->setMultipart(true);
     $this->assertTrue($this->object->isMultipart());
     $this->assertInstanceOf('\\ArrayIterator', $this->object->getIterator());
 }