Exemple #1
0
 public function testGetElements()
 {
     $this->mockTextElement();
     $this->fb->register('text', 'Boyhagemann\\Form\\Element\\Text');
     $this->fb->text('test');
     $elements = $this->fb->getElements();
     $this->assertInternalType('array', $elements);
     $this->assertCount(1, $elements);
     $this->assertSame('test', key($elements));
     // Name of the element
     $this->assertInstanceof('Boyhagemann\\Form\\Element\\Text', current($elements));
 }