/** * @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()); }
/** * @covers ::__construct * @group Fieldset */ public function testConstruct() { $attributes = ['type' => 'text', 'name' => '', 'value' => null]; $instance = new Text(); $this->assertEquals($attributes, $instance->getAttributes()); }