Exemplo n.º 1
0
 public function testSetMethod()
 {
     $form = new \r8\Form();
     $this->assertSame("POST", $form->getMethod());
     $this->assertSame($form, $form->setMethod("GET"));
     $this->assertSame("GET", $form->getMethod());
     try {
         $form->setMethod("   ");
         $this->fail("An expected exception was not thrown");
     } catch (\r8\Exception\Argument $err) {
         $this->assertSame("Must not be empty", $err->getMessage());
     }
 }