Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit 71d16f2

Browse files
author
Jamie Snape
committed
Fix problem with loading forms and components in controller tests
1 parent 0c8e6c6 commit 71d16f2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/ControllerTestCase.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,9 @@ public function loadElements()
400400

401401
Zend_Registry::set('components', array());
402402
if (isset($this->_components)) {
403+
if (!isset($this->Component)) {
404+
$this->Component = new stdClass();
405+
}
403406
foreach ($this->_components as $component) {
404407
$nameComponent = $component.'Component';
405408
Zend_Loader::loadClass($nameComponent, BASE_PATH.'/core/controllers/components');
@@ -409,6 +412,9 @@ public function loadElements()
409412

410413
Zend_Registry::set('forms', array());
411414
if (isset($this->_forms)) {
415+
if (!isset($this->Form)) {
416+
$this->Form = new stdClass();
417+
}
412418
foreach ($this->_forms as $forms) {
413419
$nameForm = $forms.'Form';
414420

0 commit comments

Comments
 (0)