示例#1
0
 /**
  * @covers ::repopulate
  * @covers ::populate
  * @covers ::inputNameToKey
  * @group  Fieldset
  */
 public function testRepopulateArray()
 {
     $name = 'name[nested]';
     $input = new Input\Text($name);
     $this->object[] = $input;
     $value = 'foobar';
     $data = ['name' => ['nested' => $value]];
     $_POST = $data;
     $this->object->repopulate();
     // Remove the following lines when you implement this test.
     $this->assertEquals($value, $input->getValue());
 }
示例#2
0
 /**
  * @covers ::__construct
  * @group  Fieldset
  */
 public function testConstruct()
 {
     $attributes = ['type' => 'text', 'name' => '', 'value' => null];
     $instance = new Text();
     $this->assertEquals($attributes, $instance->getAttributes());
 }