CodeExplorer assertObjectListWithGeneratedValues example
$list =
$this->factory->
createListFromChoices([]);
$this->
assertSame([],
$list->
getChoices());
$this->
assertSame([],
$list->
getValues());
} public function testCreateFromChoicesFlat() { $list =
$this->factory->
createListFromChoices(['A' =>
$this->obj1, 'B' =>
$this->obj2, 'C' =>
$this->obj3, 'D' =>
$this->obj4
]);
$this->
assertObjectListWithGeneratedValues($list);
} public function testCreateFromChoicesFlatTraversable() { $list =
$this->factory->
createListFromChoices( new \
ArrayIterator(['A' =>
$this->obj1, 'B' =>
$this->obj2, 'C' =>
$this->obj3, 'D' =>
$this->obj4
]) );
$this->
assertObjectListWithGeneratedValues($list);
}