예제 #1
0
 /**
  * @covers ::generateFieldset
  * @covers ::generate
  * @group  Fieldset
  */
 public function testCreateFieldset()
 {
     $attributes = ['action' => 'foo/bar', 'method' => 'POST'];
     $legend = 'Epic!';
     $config = ['attributes' => $attributes, 'legend' => $legend, 'content' => [['type' => 'submit']]];
     $fieldset = $this->builder->generateFieldset($config);
     $this->assertInstanceOf('Fuel\\Fieldset\\Fieldset', $fieldset);
     $this->assertEquals($attributes, $fieldset->getAttributes());
     $this->assertEquals($legend, $fieldset->getLegend());
     $this->assertInstanceOf('Fuel\\Fieldset\\Input\\Submit', $fieldset[0]);
 }