Exemplo n.º 1
0
 public function testCount()
 {
     $form = new \r8\Form();
     $this->assertSame(0, $form->count());
     $this->assertSame(0, count($form));
     $form->addField($this->getMockField());
     $this->assertSame(1, $form->count());
     $this->assertSame(1, count($form));
     $form->addField($this->getMockField());
     $this->assertSame(2, $form->count());
     $this->assertSame(2, count($form));
     $form->addField($this->getMockField());
     $this->assertSame(3, $form->count());
     $this->assertSame(3, count($form));
     $form->clearFields();
     $this->assertSame(0, $form->count());
     $this->assertSame(0, count($form));
 }