| @@ 24-35 (lines=12) @@ | ||
| 21 | /** |
|
| 22 | * |
|
| 23 | */ |
|
| 24 | public function testCatalogProductInquiryFormFields() |
|
| 25 | { |
|
| 26 | $form = CatalogProductInquiryForm::create(CatalogCategory_Controller::create($this->objFromFixture('CatalogCategory', |
|
| 27 | 'default')), 'ProductInquiryForm'); |
|
| 28 | $fields = $form->Fields(); |
|
| 29 | ||
| 30 | $this->assertInstanceOf('FieldList', $fields); |
|
| 31 | ||
| 32 | foreach ($fields as $field) { |
|
| 33 | $this->assertInstanceOf('FormField', $field, "field {$field->getName()} isn't a FormField instance"); |
|
| 34 | } |
|
| 35 | } |
|
| 36 | ||
| 37 | /** |
|
| 38 | * |
|
| @@ 40-51 (lines=12) @@ | ||
| 37 | /** |
|
| 38 | * |
|
| 39 | */ |
|
| 40 | public function testCatalogProductInquiryFormActions() |
|
| 41 | { |
|
| 42 | $form = CatalogProductInquiryForm::create(CatalogCategory_Controller::create($this->objFromFixture('CatalogCategory', |
|
| 43 | 'default')), 'ProductInquiryForm'); |
|
| 44 | $actions = $form->Actions(); |
|
| 45 | ||
| 46 | $this->assertInstanceOf('FieldList', $actions); |
|
| 47 | ||
| 48 | foreach ($actions as $action) { |
|
| 49 | $this->assertInstanceOf('FormAction', $action, "action {$action->getName()} isn't a FormAction instance"); |
|
| 50 | } |
|
| 51 | } |
|
| 52 | ||
| 53 | } |
|