// ->setPositions() ->getPositions()
$t->diag('->setPositions() ->getPositions()');
$w = new sfWidgetFormSchema();
$w['w1'] = $w1;
$w['w2'] = $w2;
$w->setPositions(array('w2', 'w1'));
$t->is($w->getPositions(), array('w2', 'w1'), '->setPositions() changes all field positions');
$w->setPositions(array('w1', 'w2'));
$t->is($w->getPositions(), array('w1', 'w2'), '->setPositions() changes all field positions');
$w = new sfWidgetFormSchema();
$w['w1'] = $w1;
$w['w2'] = $w2;
$w['w1'] = $w1;
$t->is($w->getPositions(), array('w1', 'w2'), '->setPositions() changes all field positions');
try {
    $w->setPositions(array('w1', 'w2', 'w3'));
    $t->fail('->setPositions() throws an InvalidArgumentException if you give it a non existant field name');
} catch (InvalidArgumentException $e) {
    $t->pass('->setPositions() throws an InvalidArgumentException if you give it a non existant field name');
}
try {
    $w->setPositions(array('w1'));
    $t->fail('->setPositions() throws an InvalidArgumentException if you miss a field name');
} catch (InvalidArgumentException $e) {
    $t->pass('->setPositions() throws an InvalidArgumentException if you miss a field name');
}
// ->moveField()
$t->diag('->moveField()');
$w = new sfWidgetFormSchema();
$w['w1'] = $w1;
$w['w2'] = $w2;