| | 361 | $w = new sfWidgetFormSchema(); |
|---|
| | 362 | $w->addFormFormatter('table', new sfWidgetFormSchemaFormatterTable($w)); |
|---|
| | 363 | $w->addFormFormatter('list', new sfWidgetFormSchemaFormatterList($w)); |
|---|
| | 364 | $w1 = clone $w; |
|---|
| | 365 | $f1 = $w1->getFormFormatters(); |
|---|
| | 366 | $f = $w->getFormFormatters(); |
|---|
| | 367 | $t->is(array_keys($f1), array_keys($f), '__clone() clones form formatters'); |
|---|
| | 368 | foreach ($f1 as $key => $formFormatter) |
|---|
| | 369 | { |
|---|
| | 370 | $t->ok($formFormatter !== $f[$key], '__clone() clones form formatters'); |
|---|
| | 371 | $t->is(get_class($formFormatter), get_class($f[$key]), '__clone() clones form formatters'); |
|---|
| | 372 | |
|---|
| | 373 | $t->ok($formFormatter->getWidgetSchema() !== $f[$key]->getWidgetSchema(), '__clone() clones form formatters'); |
|---|
| | 374 | $t->is(get_class($formFormatter->getWidgetSchema()), get_class($f[$key]->getWidgetSchema()), '__clone() clones form formatters'); |
|---|
| | 375 | } |
|---|
| | 376 | |
|---|