[Form] Added test ChoiceList::testGetChoicesForValuesCorrectOrderingOfResult for correct ordering check

This commit is contained in:
grizlik 2012-02-04 14:14:29 +04:00
parent a60daffb47
commit b65a9972fb

View File

@ -146,6 +146,12 @@ class ChoiceListTest extends \PHPUnit_Framework_TestCase
$this->assertSame(array($this->obj2, $this->obj3), $this->list->getChoicesForValues($values)); $this->assertSame(array($this->obj2, $this->obj3), $this->list->getChoicesForValues($values));
} }
public function testGetChoicesForValuesCorrectOrderingOfResult()
{
$values = array('2', '1');
$this->assertSame(array($this->obj3, $this->obj2), $this->list->getChoicesForValues($values));
}
public function testGetChoicesForValuesIgnoresNonExistingValues() public function testGetChoicesForValuesIgnoresNonExistingValues()
{ {
$values = array('1', '2', '5'); $values = array('1', '2', '5');