Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Commit

Permalink
Merge branch 'patch-11' of https://github.com/davidwindell/zf2
Browse files Browse the repository at this point in the history
  • Loading branch information
weierophinney committed Aug 17, 2012
2 parents ae574d5 + 6dae4a2 commit 2f42641
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion library/Zend/Form/Element/Select.php
Expand Up @@ -43,7 +43,8 @@ class Select extends Element implements InputProviderInterface
* @var array
*/
protected $attributes = array(
'type' => 'select',
'type' => 'select',
'options' => array(),
);

/**
Expand Down
6 changes: 6 additions & 0 deletions tests/ZendTest/Form/Element/SelectTest.php
Expand Up @@ -118,4 +118,10 @@ public function testInArrayValidationOfOptions($valueTests, $options)
$this->assertTrue($inArrayValidator->isValid($valueToTest));
}
}

public function testOptionsHasArrayOnConstruct()
{
$element = new SelectElement();
$this->assertTrue(is_array($element->getAttribute('options')));
}
}

0 comments on commit 2f42641

Please sign in to comment.