diff options
author | David <ottodavid@gmx.net> | 2015-08-10 19:50:41 +0200 |
---|---|---|
committer | David <ottodavid@gmx.net> | 2015-08-11 08:34:39 +0200 |
commit | 606874e9a883ae547df198498fce6fca7b735466 (patch) | |
tree | 2f9e772926ee22e715411e79acd8e0adfe1de2cd | |
parent | ac81ab6d556ce52e98acf636bbcd8ad4d60ecf4e (diff) |
Fix TProperyValue::ensureEnum and some unit tests class names
62 files changed, 110 insertions, 95 deletions
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveButton/Home.php b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveButton/Home.php index eb7b027c..1528fe94 100755 --- a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveButton/Home.php +++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveButton/Home.php @@ -1,5 +1,7 @@ <?php +Prado::using('System.Web.UI.TCommandEventParameter'); + // $Id: Home.php 3189 2012-07-12 12:16:21Z ctrlaltca $ class Home extends TPage { diff --git a/demos/quickstart/protected/pages/Controls/Samples/TButton/Home.php b/demos/quickstart/protected/pages/Controls/Samples/TButton/Home.php index 0ec50faa..27c026d6 100755 --- a/demos/quickstart/protected/pages/Controls/Samples/TButton/Home.php +++ b/demos/quickstart/protected/pages/Controls/Samples/TButton/Home.php @@ -1,5 +1,8 @@ <?php +Prado::using('System.Web.UI.TCommandEventParameter'); + + class Home extends TPage { public function buttonClicked($sender,$param) diff --git a/demos/quickstart/protected/pages/Controls/Samples/TImageButton/Home.php b/demos/quickstart/protected/pages/Controls/Samples/TImageButton/Home.php index 3fe33d02..5014c5fc 100755 --- a/demos/quickstart/protected/pages/Controls/Samples/TImageButton/Home.php +++ b/demos/quickstart/protected/pages/Controls/Samples/TImageButton/Home.php @@ -1,5 +1,7 @@ <?php +Prado::using('System.Web.UI.TCommandEventParameter'); + class Home extends TPage { public function buttonClicked($sender,$param) diff --git a/demos/quickstart/protected/pages/Controls/Samples/TLinkButton/Home.php b/demos/quickstart/protected/pages/Controls/Samples/TLinkButton/Home.php index 0ec50faa..ce7baf50 100755 --- a/demos/quickstart/protected/pages/Controls/Samples/TLinkButton/Home.php +++ b/demos/quickstart/protected/pages/Controls/Samples/TLinkButton/Home.php @@ -1,5 +1,7 @@ <?php +Prado::using('System.Web.UI.TCommandEventParameter'); + class Home extends TPage { public function buttonClicked($sender,$param) diff --git a/framework/Data/ActiveRecord/TActiveRecord.php b/framework/Data/ActiveRecord/TActiveRecord.php index 38f8ef29..d8337b7a 100644 --- a/framework/Data/ActiveRecord/TActiveRecord.php +++ b/framework/Data/ActiveRecord/TActiveRecord.php @@ -880,7 +880,7 @@ abstract class TActiveRecord extends \Prado\TComponent if($value === null) $this->_invalidFinderResult = null; else - $this->_invalidFinderResult = TPropertyValue::ensureEnum($value, 'TActiveRecordInvalidFinderResult'); + $this->_invalidFinderResult = TPropertyValue::ensureEnum($value, 'Prado\\Data\\ActiveRecord\\TActiveRecordInvalidFinderResult'); } /** diff --git a/framework/Data/ActiveRecord/TActiveRecordConfig.php b/framework/Data/ActiveRecord/TActiveRecordConfig.php index fc9b5f89..03fb2b5e 100644 --- a/framework/Data/ActiveRecord/TActiveRecordConfig.php +++ b/framework/Data/ActiveRecord/TActiveRecordConfig.php @@ -198,6 +198,6 @@ class TActiveRecordConfig extends TDataSourceConfig */ public function setInvalidFinderResult($value) { - $this->_invalidFinderResult = TPropertyValue::ensureEnum($value, 'TActiveRecordInvalidFinderResult'); + $this->_invalidFinderResult = TPropertyValue::ensureEnum($value, 'Prado\\Data\\ActiveRecord\\TActiveRecordInvalidFinderResult'); } } diff --git a/framework/Data/ActiveRecord/TActiveRecordManager.php b/framework/Data/ActiveRecord/TActiveRecordManager.php index 11ffa047..0a27e873 100644 --- a/framework/Data/ActiveRecord/TActiveRecordManager.php +++ b/framework/Data/ActiveRecord/TActiveRecordManager.php @@ -158,6 +158,6 @@ class TActiveRecordManager extends \Prado\TComponent */ public function setInvalidFinderResult($value) { - $this->_invalidFinderResult = TPropertyValue::ensureEnum($value, 'TActiveRecordInvalidFinderResult'); + $this->_invalidFinderResult = TPropertyValue::ensureEnum($value, 'Prado\\Data\\ActiveRecord\\TActiveRecordInvalidFinderResult'); } } diff --git a/framework/Data/SqlMap/Configuration/TSqlMapCacheModel.php b/framework/Data/SqlMap/Configuration/TSqlMapCacheModel.php index 264997c0..b860659b 100644 --- a/framework/Data/SqlMap/Configuration/TSqlMapCacheModel.php +++ b/framework/Data/SqlMap/Configuration/TSqlMapCacheModel.php @@ -83,7 +83,7 @@ class TSqlMapCacheModel extends \Prado\TComponent if (isset(self::$_cacheTypes[$value])) $this->_implementation = $value; else - $this->_implementation = TPropertyValue::ensureEnum($value,'TSqlMapCacheTypes'); + $this->_implementation = TPropertyValue::ensureEnum($value,'Prado\\Data\\SqlMap\\Configuration\\TSqlMapCacheTypes'); } /** @@ -122,11 +122,11 @@ class TSqlMapCacheModel extends \Prado\TComponent $implementation = $this->_implementation; if (isset(self::$_cacheTypes[$implementation])) return self::$_cacheTypes[$implementation]; - switch(TPropertyValue::ensureEnum($implementation,'TSqlMapCacheTypes')) + switch(TPropertyValue::ensureEnum($implementation,'Prado\\Data\\SqlMap\\Configuration\\TSqlMapCacheTypes')) { - case TSqlMapCacheTypes::FIFO: return 'TSqlMapFifoCache'; - case TSqlMapCacheTypes::LRU : return 'TSqlMapLruCache'; - case TSqlMapCacheTypes::Basic : return 'TSqlMapApplicationCache'; + case TSqlMapCacheTypes::FIFO: return '\\Prado\\Data\\SqlMap\\DataMapper\\TSqlMapFifoCache'; + case TSqlMapCacheTypes::LRU : return '\\Prado\\Data\\SqlMap\\DataMapper\\TSqlMapLruCache'; + case TSqlMapCacheTypes::Basic : return '\\Prado\\Data\\SqlMap\\DataMapper\\TSqlMapApplicationCache'; } } diff --git a/framework/Data/SqlMap/DataMapper/TPropertyAccess.php b/framework/Data/SqlMap/DataMapper/TPropertyAccess.php index 666f105b..0b57fcc3 100644 --- a/framework/Data/SqlMap/DataMapper/TPropertyAccess.php +++ b/framework/Data/SqlMap/DataMapper/TPropertyAccess.php @@ -11,6 +11,8 @@ namespace Prado\Data\SqlMap\DataMapper; +use Prado\Exceptions\TInvalidDataValueException; + /** * TPropertyAccess class provides dot notation stype property access and setting. * diff --git a/framework/Data/TDbConnection.php b/framework/Data/TDbConnection.php index 4a46daa3..3dcef603 100644 --- a/framework/Data/TDbConnection.php +++ b/framework/Data/TDbConnection.php @@ -465,7 +465,7 @@ class TDbConnection extends \Prado\TComponent */ public function setColumnCase($value) { - switch(TPropertyValue::ensureEnum($value,'TDbColumnCaseMode')) + switch(TPropertyValue::ensureEnum($value,'Prado\\Data\\TDbColumnCaseMode')) { case TDbColumnCaseMode::Preserved: $value=PDO::CASE_NATURAL; @@ -501,7 +501,7 @@ class TDbConnection extends \Prado\TComponent */ public function setNullConversion($value) { - switch(TPropertyValue::ensureEnum($value,'TDbNullConversionMode')) + switch(TPropertyValue::ensureEnum($value,'Prado\\Data\\TDbNullConversionMode')) { case TDbNullConversionMode::Preserved: $value=PDO::NULL_NATURAL; diff --git a/framework/Security/TUserManager.php b/framework/Security/TUserManager.php index 3bc266db..9213b90b 100644 --- a/framework/Security/TUserManager.php +++ b/framework/Security/TUserManager.php @@ -282,7 +282,7 @@ class TUserManager extends \Prado\TModule implements IUserManager */ public function setPasswordMode($value) { - $this->_passwordMode=TPropertyValue::ensureEnum($value,'TUserManagerPasswordMode'); + $this->_passwordMode=TPropertyValue::ensureEnum($value,'Prado\\Security\\TUserManagerPasswordMode'); } /** diff --git a/framework/TComponent.php b/framework/TComponent.php index 447f695e..5d31df91 100644 --- a/framework/TComponent.php +++ b/framework/TComponent.php @@ -432,7 +432,7 @@ class TComponent foreach($fx as $func) $this->attachEventHandler($func,array($this,$func)); - if(is_a($this,'IDynamicMethods')) { + if(is_a($this,'Prado\\Util\\IDynamicMethods')) { $this->attachEventHandler(TComponent::GLOBAL_RAISE_EVENT_LISTENER,array($this,'__dycall')); array_push($fx,TComponent::GLOBAL_RAISE_EVENT_LISTENER); } @@ -466,7 +466,7 @@ class TComponent foreach($fx as $func) $this->detachEventHandler($func,array($this,$func)); - if(is_a($this,'IDynamicMethods')) { + if(is_a($this,'Prado\\Util\\IDynamicMethods')) { $this->detachEventHandler(TComponent::GLOBAL_RAISE_EVENT_LISTENER,array($this,'__dycall')); array_push($fx,TComponent::GLOBAL_RAISE_EVENT_LISTENER); } diff --git a/framework/Web/Services/TPageService.php b/framework/Web/Services/TPageService.php index a52efd13..2973e67b 100644 --- a/framework/Web/Services/TPageService.php +++ b/framework/Web/Services/TPageService.php @@ -495,8 +495,9 @@ class TPageService extends \Prado\TService { $className=basename($path); $namespacedClassName = static::PAGE_NAMESPACE_PREFIX .str_replace('.', '\\', $pagePath); - if(!class_exists($className,false) && !class_exists($namespacedClassName, false)) - include_once($path.Prado::CLASS_FILE_EXT); + + if(!class_exists($className,false) && !class_exists($namespacedClassName, false)) + include_once($path.Prado::CLASS_FILE_EXT); if(!class_exists($className,false)) $className = $namespacedClassName; @@ -504,6 +505,9 @@ class TPageService extends \Prado\TService else { $className=$this->getBasePageClass(); + Prado::using($className); + if(($pos=strrpos($className,'.'))!==false) + $className=substr($className,$pos+1); } if(!class_exists($className,false) || ($className!=='TPage' && !is_subclass_of($className,'TPage'))) diff --git a/framework/Web/THttpRequest.php b/framework/Web/THttpRequest.php index 25cde757..42fc5dc1 100644 --- a/framework/Web/THttpRequest.php +++ b/framework/Web/THttpRequest.php @@ -374,7 +374,7 @@ class THttpRequest extends \Prado\TApplicationComponent implements \IteratorAggr */ public function setUrlFormat($value) { - $this->_urlFormat=TPropertyValue::ensureEnum($value,'THttpRequestUrlFormat'); + $this->_urlFormat=TPropertyValue::ensureEnum($value,'Prado\\Web\\THttpRequestUrlFormat'); } /** diff --git a/framework/Web/THttpSession.php b/framework/Web/THttpSession.php index 1e995fd6..8924c781 100644 --- a/framework/Web/THttpSession.php +++ b/framework/Web/THttpSession.php @@ -309,7 +309,7 @@ class THttpSession extends \Prado\TApplicationComponent implements \IteratorAggr throw new TInvalidOperationException('httpsession_cookiemode_unchangeable'); else { - $value=TPropertyValue::ensureEnum($value,'THttpSessionCookieMode'); + $value=TPropertyValue::ensureEnum($value,'Prado\\Web\\THttpSessionCookieMode'); if($value===THttpSessionCookieMode::None) { ini_set('session.use_cookies','0'); diff --git a/framework/Web/TUrlMappingPattern.php b/framework/Web/TUrlMappingPattern.php index 3d370940..cb28a278 100644 --- a/framework/Web/TUrlMappingPattern.php +++ b/framework/Web/TUrlMappingPattern.php @@ -435,7 +435,7 @@ class TUrlMappingPattern extends \Prado\TComponent */ public function setUrlFormat($value) { - $this->_urlFormat=TPropertyValue::ensureEnum($value,'THttpRequestUrlFormat'); + $this->_urlFormat=TPropertyValue::ensureEnum($value,'Prado\\Web\\THttpRequestUrlFormat'); } /** @@ -473,7 +473,7 @@ class TUrlMappingPattern extends \Prado\TComponent */ public function setSecureConnection($value) { - $this->_secureConnection = TPropertyValue::ensureEnum($value, 'TUrlMappingPatternSecureConnection'); + $this->_secureConnection = TPropertyValue::ensureEnum($value, 'Prado\\Web\\TUrlMappingPatternSecureConnection'); } /** diff --git a/framework/Web/UI/ActiveControls/TActiveEditCommandColumn.php b/framework/Web/UI/ActiveControls/TActiveEditCommandColumn.php index 60d5ab29..2d130917 100644 --- a/framework/Web/UI/ActiveControls/TActiveEditCommandColumn.php +++ b/framework/Web/UI/ActiveControls/TActiveEditCommandColumn.php @@ -36,12 +36,12 @@ use Prado\Web\UI\WebControls\TEditCommandColumn; class TActiveEditCommandColumn extends TEditCommandColumn { protected function createButton($commandName,$text,$causesValidation,$validationGroup) { if($this->getButtonType()===TButtonColumnType::LinkButton) - $button=Prado::createComponent('System.Web.UI.WebControls.TActiveLinkButton'); + $button=Prado::createComponent('System.Web.UI.ActiveControls.TActiveLinkButton'); else if($this->getButtonType()===TButtonColumnType::PushButton) - $button=Prado::createComponent('System.Web.UI.WebControls.TActiveButton'); + $button=Prado::createComponent('System.Web.UI.ActiveControls.TActiveButton'); else // image buttons { - $button=Prado::createComponent('System.Web.UI.WebControls.TActiveImageButton'); + $button=Prado::createComponent('System.Web.UI.ActiveControls.TActiveImageButton'); $button->setToolTip($text); if(strcasecmp($commandName,'Update')===0) $url=$this->getUpdateImageUrl(); diff --git a/framework/Web/UI/ActiveControls/TDraggable.php b/framework/Web/UI/ActiveControls/TDraggable.php index b4780eda..45344b27 100755 --- a/framework/Web/UI/ActiveControls/TDraggable.php +++ b/framework/Web/UI/ActiveControls/TDraggable.php @@ -80,7 +80,7 @@ class TDraggable extends TPanel $value=TDraggableRevertOptions::Revert; elseif (strcasecmp($value,'false')==0 || $value===false) $value=TDraggableRevertOptions::None; - $this->setViewState('Revert', TPropertyValue::ensureEnum($value, 'TDraggableRevertOptions'), true); + $this->setViewState('Revert', TPropertyValue::ensureEnum($value, 'Prado\\Web\\UI\\ActiveControls\\TDraggableRevertOptions'), true); } /** @@ -118,7 +118,7 @@ class TDraggable extends TPanel $value=TDraggableGhostingOptions::Ghosting; elseif (strcasecmp($value,'false')==0 || $value===false) $value=TDraggableGhostingOptions::None; - $this->setViewState('Ghosting', TPropertyValue::ensureEnum($value, 'TDraggableGhostingOptions'), TDraggableGhostingOptions::None); + $this->setViewState('Ghosting', TPropertyValue::ensureEnum($value, 'Prado\\Web\\UI\\ActiveControls\\TDraggableGhostingOptions'), TDraggableGhostingOptions::None); } /** @@ -136,7 +136,7 @@ class TDraggable extends TPanel */ public function setConstraint($value) { - $this->setViewState('Constraint', TPropertyValue::ensureEnum($value, 'TDraggableConstraint'), TDraggableConstraint::None); + $this->setViewState('Constraint', TPropertyValue::ensureEnum($value, 'Prado\\Web\\UI\\ActiveControls\\DraggableConstraint'), TDraggableConstraint::None); } /** diff --git a/framework/Web/UI/WebControls/TBaseValidator.php b/framework/Web/UI/WebControls/TBaseValidator.php index d39713f0..f5097cf3 100644 --- a/framework/Web/UI/WebControls/TBaseValidator.php +++ b/framework/Web/UI/WebControls/TBaseValidator.php @@ -339,7 +339,7 @@ abstract class TBaseValidator extends TLabel implements IValidator */ public function setDisplay($value) { - $this->setViewState('Display',TPropertyValue::ensureEnum($value,'TValidatorDisplayStyle'),TValidatorDisplayStyle::Fixed); + $this->setViewState('Display',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TValidatorDisplayStyle'),TValidatorDisplayStyle::Fixed); } /** diff --git a/framework/Web/UI/WebControls/TBulletedList.php b/framework/Web/UI/WebControls/TBulletedList.php index 784ff94a..e75eff6f 100644 --- a/framework/Web/UI/WebControls/TBulletedList.php +++ b/framework/Web/UI/WebControls/TBulletedList.php @@ -173,7 +173,7 @@ class TBulletedList extends TListControl implements \Prado\Web\UI\IPostBackEvent */ public function setBulletStyle($value) { - $this->setViewState('BulletStyle',TPropertyValue::ensureEnum($value,'TBulletStyle'),TBulletStyle::NotSet); + $this->setViewState('BulletStyle',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TBulletStyle'),TBulletStyle::NotSet); } /** @@ -189,7 +189,7 @@ class TBulletedList extends TListControl implements \Prado\Web\UI\IPostBackEvent */ public function setDisplayMode($value) { - $this->setViewState('DisplayMode',TPropertyValue::ensureEnum($value,'TBulletedListDisplayMode'),TBulletedListDisplayMode::Text); + $this->setViewState('DisplayMode',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TBulletedListDisplayMode'),TBulletedListDisplayMode::Text); } /** diff --git a/framework/Web/UI/WebControls/TButton.php b/framework/Web/UI/WebControls/TButton.php index 6591bb76..b33f4223 100644 --- a/framework/Web/UI/WebControls/TButton.php +++ b/framework/Web/UI/WebControls/TButton.php @@ -343,6 +343,6 @@ class TButton extends \Prado\Web\UI\WebControls\TWebControl implements \Prado\We */ public function setButtonType($value) { - $this->setViewState('ButtonType',TPropertyValue::ensureEnum($value,'TButtonType'),TButtonType::Submit); + $this->setViewState('ButtonType',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TButtonType'),TButtonType::Submit); } }
\ No newline at end of file diff --git a/framework/Web/UI/WebControls/TButtonColumn.php b/framework/Web/UI/WebControls/TButtonColumn.php index 54f52a01..6fa2e52a 100644 --- a/framework/Web/UI/WebControls/TButtonColumn.php +++ b/framework/Web/UI/WebControls/TButtonColumn.php @@ -157,7 +157,7 @@ class TButtonColumn extends TDataGridColumn */ public function setButtonType($value) { - $this->setViewState('ButtonType',TPropertyValue::ensureEnum($value,'TButtonColumnType'),TButtonColumnType::LinkButton); + $this->setViewState('ButtonType',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TButtonColumnType'),TButtonColumnType::LinkButton); } /** diff --git a/framework/Web/UI/WebControls/TCheckBox.php b/framework/Web/UI/WebControls/TCheckBox.php index 1ff69ba6..dc60f2fa 100644 --- a/framework/Web/UI/WebControls/TCheckBox.php +++ b/framework/Web/UI/WebControls/TCheckBox.php @@ -191,7 +191,7 @@ class TCheckBox extends \Prado\Web\UI\WebControls\TWebControl implements \Prado\ */ public function setTextAlign($value) { - $this->setViewState('TextAlign',TPropertyValue::ensureEnum($value,'TTextAlign'),TTextAlign::Right); + $this->setViewState('TextAlign',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TTextAlign'),TTextAlign::Right); } /** diff --git a/framework/Web/UI/WebControls/TCheckBoxList.php b/framework/Web/UI/WebControls/TCheckBoxList.php index 533ac527..0e3c09b9 100644 --- a/framework/Web/UI/WebControls/TCheckBoxList.php +++ b/framework/Web/UI/WebControls/TCheckBoxList.php @@ -111,7 +111,7 @@ class TCheckBoxList extends TListControl implements IRepeatInfoUser, \Prado\Web\ */ public function setTextAlign($value) { - $this->setViewState('TextAlign',TPropertyValue::ensureEnum($value,'TTextAlign'),TTextAlign::Right); + $this->setViewState('TextAlign',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TTextAlign'),TTextAlign::Right); } diff --git a/framework/Web/UI/WebControls/TColorPicker.php b/framework/Web/UI/WebControls/TColorPicker.php index 876c464e..a68131e8 100644 --- a/framework/Web/UI/WebControls/TColorPicker.php +++ b/framework/Web/UI/WebControls/TColorPicker.php @@ -67,7 +67,7 @@ class TColorPicker extends TTextBox */ public function setMode($value) { - $this->setViewState('Mode', TPropertyValue::ensureEnum($value, 'TColorPickerMode'), TColorPickerMode::Basic); + $this->setViewState('Mode', TPropertyValue::ensureEnum($value, 'Prado\\Web\\UI\\WebControls\\TColorPickerMode'), TColorPickerMode::Basic); } /** diff --git a/framework/Web/UI/WebControls/TCompareValidator.php b/framework/Web/UI/WebControls/TCompareValidator.php index a4c44e82..130ee97d 100644 --- a/framework/Web/UI/WebControls/TCompareValidator.php +++ b/framework/Web/UI/WebControls/TCompareValidator.php @@ -69,7 +69,7 @@ class TCompareValidator extends TBaseValidator */ public function setDataType($value) { - $this->setViewState('DataType',TPropertyValue::ensureEnum($value,'TValidationDataType'),TValidationDataType::String); + $this->setViewState('DataType',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TValidationDataType'),TValidationDataType::String); } /** @@ -120,7 +120,7 @@ class TCompareValidator extends TBaseValidator */ public function setOperator($value) { - $this->setViewState('Operator',TPropertyValue::ensureEnum($value,'TValidationCompareOperator'),TValidationCompareOperator::Equal); + $this->setViewState('Operator',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TValidationCompareOperator'),TValidationCompareOperator::Equal); } /** diff --git a/framework/Web/UI/WebControls/TDataGrid.php b/framework/Web/UI/WebControls/TDataGrid.php index d8c29ddd..a9dbff4f 100644 --- a/framework/Web/UI/WebControls/TDataGrid.php +++ b/framework/Web/UI/WebControls/TDataGrid.php @@ -468,7 +468,7 @@ class TDataGrid extends TBaseDataList implements \Prado\Web\UI\INamingContainer */ public function setCaptionAlign($value) { - $this->setViewState('CaptionAlign',TPropertyValue::ensureEnum($value,'TTableCaptionAlign'),TTableCaptionAlign::NotSet); + $this->setViewState('CaptionAlign',TPropertyValue::ensureEnum($value,'TPrado\\Web\\UI\\WebControls\\TableCaptionAlign'),TTableCaptionAlign::NotSet); } /** diff --git a/framework/Web/UI/WebControls/TDataGridItem.php b/framework/Web/UI/WebControls/TDataGridItem.php index ee645138..2525cc05 100644 --- a/framework/Web/UI/WebControls/TDataGridItem.php +++ b/framework/Web/UI/WebControls/TDataGridItem.php @@ -81,7 +81,7 @@ class TDataGridItem extends TTableRow implements \Prado\Web\UI\INamingContainer */ public function setItemType($value) { - $this->_itemType=TPropertyValue::ensureEnum($value,'TListItemType'); + $this->_itemType=TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TListItemType'); } /** diff --git a/framework/Web/UI/WebControls/TDataGridPagerStyle.php b/framework/Web/UI/WebControls/TDataGridPagerStyle.php index 8164ff86..2a88699c 100644 --- a/framework/Web/UI/WebControls/TDataGridPagerStyle.php +++ b/framework/Web/UI/WebControls/TDataGridPagerStyle.php @@ -47,7 +47,7 @@ class TDataGridPagerStyle extends TPanelStyle */ public function setMode($value) { - $this->_mode=TPropertyValue::ensureEnum($value,'TDataGridPagerMode'); + $this->_mode=TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TDataGridPagerMode'); } /** @@ -63,7 +63,7 @@ class TDataGridPagerStyle extends TPanelStyle */ public function setButtonType($value) { - $this->_buttonType=TPropertyValue::ensureEnum($value,'TDataGridPagerButtonType'); + $this->_buttonType=TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TDataGridPagerButtonType'); } /** @@ -162,7 +162,7 @@ class TDataGridPagerStyle extends TPanelStyle */ public function setPosition($value) { - $this->_position=TPropertyValue::ensureEnum($value,'TDataGridPagerPosition'); + $this->_position=TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TDataGridPagerPosition'); } /** diff --git a/framework/Web/UI/WebControls/TDataListItem.php b/framework/Web/UI/WebControls/TDataListItem.php index ba28ee86..8e67bbd2 100644 --- a/framework/Web/UI/WebControls/TDataListItem.php +++ b/framework/Web/UI/WebControls/TDataListItem.php @@ -84,7 +84,7 @@ class TDataListItem extends \Prado\Web\UI\WebControls\TWebControl implements \Pr */ public function setItemType($value) { - $this->_itemType=TPropertyValue::ensureEnum($value,'TListItemType'); + $this->_itemType=TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TListItemType'); } /** diff --git a/framework/Web/UI/WebControls/TDataTypeValidator.php b/framework/Web/UI/WebControls/TDataTypeValidator.php index 4d4b5919..6fe747fb 100644 --- a/framework/Web/UI/WebControls/TDataTypeValidator.php +++ b/framework/Web/UI/WebControls/TDataTypeValidator.php @@ -57,7 +57,7 @@ class TDataTypeValidator extends TBaseValidator */ public function setDataType($value) { - $this->setViewState('DataType',TPropertyValue::ensureEnum($value,'TValidationDataType'),TValidationDataType::String); + $this->setViewState('DataType',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TValidationDataType'),TValidationDataType::String); } /** diff --git a/framework/Web/UI/WebControls/TDatePicker.php b/framework/Web/UI/WebControls/TDatePicker.php index 5483b6b2..25d1ad65 100644 --- a/framework/Web/UI/WebControls/TDatePicker.php +++ b/framework/Web/UI/WebControls/TDatePicker.php @@ -154,7 +154,7 @@ class TDatePicker extends TTextBox */ public function setInputMode($value) { - $this->setViewState('InputMode', TPropertyValue::ensureEnum($value, 'TDatePickerInputMode'), TDatePickerInputMode::TextBox); + $this->setViewState('InputMode', TPropertyValue::ensureEnum($value, 'Prado\\Web\\UI\\WebControls\\TDatePickerInputMode'), TDatePickerInputMode::TextBox); } /** @@ -170,7 +170,7 @@ class TDatePicker extends TTextBox */ public function setMode($value) { - $this->setViewState('Mode', TPropertyValue::ensureEnum($value, 'TDatePickerMode'), TDatePickerMode::Basic); + $this->setViewState('Mode', TPropertyValue::ensureEnum($value, 'Prado\\Web\\UI\\WebControls\\TDatePickerMode'), TDatePickerMode::Basic); } /** @@ -282,7 +282,7 @@ class TDatePicker extends TTextBox */ public function setPositionMode($value) { - $this->setViewState('PositionMode', TPropertyValue::ensureEnum($value, 'TDatePickerPositionMode'), TDatePickerPositionMode::Bottom); + $this->setViewState('PositionMode', TPropertyValue::ensureEnum($value, 'Prado\\Web\\UI\\WebControls\\TDatePickerPositionMode'), TDatePickerPositionMode::Bottom); } /** diff --git a/framework/Web/UI/WebControls/TEditCommandColumn.php b/framework/Web/UI/WebControls/TEditCommandColumn.php index 48fff83c..551618ff 100644 --- a/framework/Web/UI/WebControls/TEditCommandColumn.php +++ b/framework/Web/UI/WebControls/TEditCommandColumn.php @@ -63,7 +63,7 @@ class TEditCommandColumn extends TDataGridColumn */ public function setButtonType($value) { - $this->setViewState('ButtonType',TPropertyValue::ensureEnum($value,'TButtonColumnType'),TButtonColumnType::LinkButton); + $this->setViewState('ButtonType',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TButtonColumnType'),TButtonColumnType::LinkButton); } /** diff --git a/framework/Web/UI/WebControls/THotSpot.php b/framework/Web/UI/WebControls/THotSpot.php index 1d2624f2..47bac136 100644 --- a/framework/Web/UI/WebControls/THotSpot.php +++ b/framework/Web/UI/WebControls/THotSpot.php @@ -114,7 +114,7 @@ abstract class THotSpot extends \Prado\TComponent */ public function setHotSpotMode($value) { - $this->setViewState('HotSpotMode',TPropertyValue::ensureEnum($value,'THotSpotMode'),THotSpotMode::NotSet); + $this->setViewState('HotSpotMode',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\THotSpotMode'),THotSpotMode::NotSet); } /** diff --git a/framework/Web/UI/WebControls/TImageMap.php b/framework/Web/UI/WebControls/TImageMap.php index 53a2f660..5bf9ef79 100644 --- a/framework/Web/UI/WebControls/TImageMap.php +++ b/framework/Web/UI/WebControls/TImageMap.php @@ -172,7 +172,7 @@ class TImageMap extends TImage implements \Prado\Web\UI\IPostBackEventHandler */ public function setHotSpotMode($value) { - $this->setViewState('HotSpotMode',TPropertyValue::ensureEnum($value,'THotSpotMode'),THotSpotMode::NotSet); + $this->setViewState('HotSpotMode',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\THotSpotMode'),THotSpotMode::NotSet); } /** diff --git a/framework/Web/UI/WebControls/TInlineFrame.php b/framework/Web/UI/WebControls/TInlineFrame.php index b299678b..26b90288 100644 --- a/framework/Web/UI/WebControls/TInlineFrame.php +++ b/framework/Web/UI/WebControls/TInlineFrame.php @@ -55,7 +55,7 @@ class TInlineFrame extends \Prado\Web\UI\WebControls\TWebControl implements \Pra */ public function setAlign($value) { - $this->setViewState('Align',TPropertyValue::ensureEnum($value,'TInlineFrameAlign'),TInlineFrameAlign::NotSet); + $this->setViewState('Align',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TInlineFrameAlign'),TInlineFrameAlign::NotSet); } /** @@ -145,7 +145,7 @@ class TInlineFrame extends \Prado\Web\UI\WebControls\TWebControl implements \Pra */ public function setScrollBars($value) { - $this->setViewState('ScrollBars',TPropertyValue::ensureEnum($value,'TInlineFrameScrollBars'),TInlineFrameScrollBars::Auto); + $this->setViewState('ScrollBars',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TInlineFrameScrollBars'),TInlineFrameScrollBars::Auto); } /** diff --git a/framework/Web/UI/WebControls/TItemDataRenderer.php b/framework/Web/UI/WebControls/TItemDataRenderer.php index 8dd3d51c..e135eeeb 100644 --- a/framework/Web/UI/WebControls/TItemDataRenderer.php +++ b/framework/Web/UI/WebControls/TItemDataRenderer.php @@ -55,7 +55,7 @@ abstract class TItemDataRenderer extends TDataRenderer implements IItemDataRende */ public function setItemType($value) { - $this->_itemType=TPropertyValue::ensureEnum($value,'TListItemType'); + $this->_itemType=TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TListItemType'); } /** diff --git a/framework/Web/UI/WebControls/TListBox.php b/framework/Web/UI/WebControls/TListBox.php index a9dd8953..35f1f085 100644 --- a/framework/Web/UI/WebControls/TListBox.php +++ b/framework/Web/UI/WebControls/TListBox.php @@ -205,7 +205,7 @@ class TListBox extends TListControl implements \Prado\Web\UI\IPostBackDataHandle */ public function setSelectionMode($value) { - $this->setViewState('SelectionMode',TPropertyValue::ensureEnum($value,'TListSelectionMode'),TListSelectionMode::Single); + $this->setViewState('SelectionMode',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TListSelectionMode'),TListSelectionMode::Single); } /** diff --git a/framework/Web/UI/WebControls/TPager.php b/framework/Web/UI/WebControls/TPager.php index 2a37021f..34abea9a 100644 --- a/framework/Web/UI/WebControls/TPager.php +++ b/framework/Web/UI/WebControls/TPager.php @@ -130,7 +130,7 @@ class TPager extends \Prado\Web\UI\WebControls\TWebControl implements \Prado\Web */ public function setMode($value) { - $this->setViewState('Mode',TPropertyValue::ensureEnum($value,'TPagerMode'),TPagerMode::NextPrev); + $this->setViewState('Mode',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TPagerMode'),TPagerMode::NextPrev); } /** @@ -146,7 +146,7 @@ class TPager extends \Prado\Web\UI\WebControls\TWebControl implements \Prado\Web */ public function setButtonType($value) { - $this->setViewState('ButtonType',TPropertyValue::ensureEnum($value,'TPagerButtonType'),TPagerButtonType::LinkButton); + $this->setViewState('ButtonType',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TPagerButtonType'),TPagerButtonType::LinkButton); } /** diff --git a/framework/Web/UI/WebControls/TPanelStyle.php b/framework/Web/UI/WebControls/TPanelStyle.php index 8185d453..88d8fe2b 100644 --- a/framework/Web/UI/WebControls/TPanelStyle.php +++ b/framework/Web/UI/WebControls/TPanelStyle.php @@ -108,7 +108,7 @@ class TPanelStyle extends TStyle */ public function setDirection($value) { - $this->_direction=TPropertyValue::ensureEnum($value,'TContentDirection'); + $this->_direction=TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TContentDirection'); } /** @@ -142,7 +142,7 @@ class TPanelStyle extends TStyle */ public function setHorizontalAlign($value) { - $this->_horizontalAlign=TPropertyValue::ensureEnum($value,'THorizontalAlign'); + $this->_horizontalAlign=TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\THorizontalAlign'); } /** @@ -158,7 +158,7 @@ class TPanelStyle extends TStyle */ public function setScrollBars($value) { - $this->_scrollBars=TPropertyValue::ensureEnum($value,'TScrollBars'); + $this->_scrollBars=TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TScrollBars'); } /** diff --git a/framework/Web/UI/WebControls/TRadioButton.php b/framework/Web/UI/WebControls/TRadioButton.php index 35a64a2e..c82d73ad 100644 --- a/framework/Web/UI/WebControls/TRadioButton.php +++ b/framework/Web/UI/WebControls/TRadioButton.php @@ -164,7 +164,7 @@ class TRadioButton extends TCheckBox { if($groupName!=='') $groupName=substr($uniqueID,0,$pos+1).$groupName; - else if(is_a($this->getNamingContainer(), 'TRadioButtonList')) + else if($this->getNamingContainer() instanceof TRadioButtonList) $groupName=substr($uniqueID,0,$pos); } if($groupName==='') diff --git a/framework/Web/UI/WebControls/TRangeValidator.php b/framework/Web/UI/WebControls/TRangeValidator.php index 8d9372fa..0a608392 100644 --- a/framework/Web/UI/WebControls/TRangeValidator.php +++ b/framework/Web/UI/WebControls/TRangeValidator.php @@ -124,7 +124,7 @@ class TRangeValidator extends TBaseValidator */ public function setDataType($value) { - $this->setViewState('DataType',TPropertyValue::ensureEnum($value,'TRangeValidationDataType'),TRangeValidationDataType::String); + $this->setViewState('DataType',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TRangeValidationDataType'),TRangeValidationDataType::String); } /** diff --git a/framework/Web/UI/WebControls/TRepeatInfo.php b/framework/Web/UI/WebControls/TRepeatInfo.php index b90fa0d5..dce72080 100644 --- a/framework/Web/UI/WebControls/TRepeatInfo.php +++ b/framework/Web/UI/WebControls/TRepeatInfo.php @@ -83,7 +83,7 @@ class TRepeatInfo extends \Prado\TComponent */ public function setCaptionAlign($value) { - $this->_captionAlign=TPropertyValue::ensureEnum($value,'TTableCaptionAlign'); + $this->_captionAlign=TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TTableCaptionAlign'); } /** @@ -117,7 +117,7 @@ class TRepeatInfo extends \Prado\TComponent */ public function setRepeatDirection($value) { - $this->_repeatDirection=TPropertyValue::ensureEnum($value,'TRepeatDirection'); + $this->_repeatDirection=TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TRepeatDirection'); } /** @@ -133,7 +133,7 @@ class TRepeatInfo extends \Prado\TComponent */ public function setRepeatLayout($value) { - $this->_repeatLayout=TPropertyValue::ensureEnum($value,'TRepeatLayout'); + $this->_repeatLayout=TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TRepeatLayout'); } /** diff --git a/framework/Web/UI/WebControls/TRepeaterItem.php b/framework/Web/UI/WebControls/TRepeaterItem.php index 23e00619..50bd370c 100644 --- a/framework/Web/UI/WebControls/TRepeaterItem.php +++ b/framework/Web/UI/WebControls/TRepeaterItem.php @@ -55,7 +55,7 @@ class TRepeaterItem extends \Prado\Web\UI\TControl implements \Prado\Web\UI\INam */ public function setItemType($value) { - $this->_itemType=TPropertyValue::ensureEnum($value,'TListItemType'); + $this->_itemType=TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TListItemType'); } /** diff --git a/framework/Web/UI/WebControls/TSlider.php b/framework/Web/UI/WebControls/TSlider.php index df36c9a8..f7331017 100644 --- a/framework/Web/UI/WebControls/TSlider.php +++ b/framework/Web/UI/WebControls/TSlider.php @@ -76,7 +76,7 @@ class TSlider extends \Prado\Web\UI\WebControls\TWebControl implements \Prado\We */ public function setDirection($value) { - $this->setViewState('Direction', TPropertyValue::ensureEnum($value,'TSliderDirection'),TSliderDirection::Horizontal); + $this->setViewState('Direction', TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TSliderDirection'),TSliderDirection::Horizontal); } /** diff --git a/framework/Web/UI/WebControls/TStyle.php b/framework/Web/UI/WebControls/TStyle.php index 6e4cf826..a45ff500 100644 --- a/framework/Web/UI/WebControls/TStyle.php +++ b/framework/Web/UI/WebControls/TStyle.php @@ -187,7 +187,7 @@ class TStyle extends \Prado\TComponent */ public function setDisplayStyle($value) { - $this->_displayStyle = TPropertyValue::ensureEnum($value, 'TDisplayStyle'); + $this->_displayStyle = TPropertyValue::ensureEnum($value, 'Prado\\Web\\UI\\WebControls\\TDisplayStyle'); switch($this->_displayStyle) { case TDisplayStyle::None: diff --git a/framework/Web/UI/WebControls/TTable.php b/framework/Web/UI/WebControls/TTable.php index 437aab2b..7f6a61bf 100644 --- a/framework/Web/UI/WebControls/TTable.php +++ b/framework/Web/UI/WebControls/TTable.php @@ -162,7 +162,7 @@ class TTable extends \Prado\Web\UI\WebControls\TWebControl */ public function setCaptionAlign($value) { - $this->setViewState('CaptionAlign',TPropertyValue::ensureEnum($value,'TTableCaptionAlign'),TTableCaptionAlign::NotSet); + $this->setViewState('CaptionAlign',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TTableCaptionAlign'),TTableCaptionAlign::NotSet); } /** diff --git a/framework/Web/UI/WebControls/TTableHeaderCell.php b/framework/Web/UI/WebControls/TTableHeaderCell.php index 22574eee..5c8ea322 100644 --- a/framework/Web/UI/WebControls/TTableHeaderCell.php +++ b/framework/Web/UI/WebControls/TTableHeaderCell.php @@ -59,7 +59,7 @@ class TTableHeaderCell extends TTableCell */ public function setScope($value) { - $this->setViewState('Scope',TPropertyValue::ensureEnum($value,'TTableHeaderScope'),TTableHeaderScope::NotSet); + $this->setViewState('Scope',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TTableHeaderScope'),TTableHeaderScope::NotSet); } /** diff --git a/framework/Web/UI/WebControls/TTableItemStyle.php b/framework/Web/UI/WebControls/TTableItemStyle.php index acf58bd7..dd9b15ad 100644 --- a/framework/Web/UI/WebControls/TTableItemStyle.php +++ b/framework/Web/UI/WebControls/TTableItemStyle.php @@ -121,7 +121,7 @@ class TTableItemStyle extends TStyle */ public function setHorizontalAlign($value) { - $this->_horizontalAlign=TPropertyValue::ensureEnum($value,'THorizontalAlign'); + $this->_horizontalAlign=TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\THorizontalAlign'); } /** @@ -138,7 +138,7 @@ class TTableItemStyle extends TStyle */ public function setVerticalAlign($value) { - $this->_verticalAlign=TPropertyValue::ensureEnum($value,'TVerticalAlign'); + $this->_verticalAlign=TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TVerticalAlign'); } /** diff --git a/framework/Web/UI/WebControls/TTableRow.php b/framework/Web/UI/WebControls/TTableRow.php index 89988d9e..f4636e77 100644 --- a/framework/Web/UI/WebControls/TTableRow.php +++ b/framework/Web/UI/WebControls/TTableRow.php @@ -129,7 +129,7 @@ class TTableRow extends \Prado\Web\UI\WebControls\TWebControl */ public function setTableSection($value) { - $this->setViewState('TableSection',TPropertyValue::ensureEnum($value,'TTableRowSection'),TTableRowSection::Body); + $this->setViewState('TableSection',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TTableRowSection'),TTableRowSection::Body); } /** diff --git a/framework/Web/UI/WebControls/TTableStyle.php b/framework/Web/UI/WebControls/TTableStyle.php index 97d91531..876355d3 100644 --- a/framework/Web/UI/WebControls/TTableStyle.php +++ b/framework/Web/UI/WebControls/TTableStyle.php @@ -232,7 +232,7 @@ class TTableStyle extends TStyle */ public function setGridLines($value) { - $this->_gridLines=TPropertyValue::ensureEnum($value,'TTableGridLines'); + $this->_gridLines=TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TTableGridLines'); } diff --git a/framework/Web/UI/WebControls/TValidationSummary.php b/framework/Web/UI/WebControls/TValidationSummary.php index 765d92ff..90df041b 100644 --- a/framework/Web/UI/WebControls/TValidationSummary.php +++ b/framework/Web/UI/WebControls/TValidationSummary.php @@ -66,7 +66,7 @@ class TValidationSummary extends \Prado\Web\UI\WebControls\TWebControl */ public function setDisplay($value) { - $this->setViewState('Display',TPropertyValue::ensureEnum($value,'TValidationSummaryDisplayStyle'),TValidationSummaryDisplayStyle::Fixed); + $this->setViewState('Display',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TValidationSummaryDisplayStyle'),TValidationSummaryDisplayStyle::Fixed); } /** @@ -99,7 +99,7 @@ class TValidationSummary extends \Prado\Web\UI\WebControls\TWebControl */ public function setDisplayMode($value) { - $this->setViewState('DisplayMode',TPropertyValue::ensureEnum($value,'TValidationSummaryDisplayMode'),TValidationSummaryDisplayMode::BulletList); + $this->setViewState('DisplayMode',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TValidationSummaryDisplayMode'),TValidationSummaryDisplayMode::BulletList); } /** diff --git a/framework/Web/UI/WebControls/TWizardNavigationButtonStyle.php b/framework/Web/UI/WebControls/TWizardNavigationButtonStyle.php index 94e27e8d..9ad6cbcb 100644 --- a/framework/Web/UI/WebControls/TWizardNavigationButtonStyle.php +++ b/framework/Web/UI/WebControls/TWizardNavigationButtonStyle.php @@ -129,7 +129,7 @@ class TWizardNavigationButtonStyle extends TStyle */ public function setButtonType($value) { - $this->_buttonType=TPropertyValue::ensureEnum($value,'TWizardNavigationButtonType'); + $this->_buttonType=TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TWizardNavigationButtonType'); } /** diff --git a/framework/Web/UI/WebControls/TWizardStep.php b/framework/Web/UI/WebControls/TWizardStep.php index 57b96c44..4d912271 100644 --- a/framework/Web/UI/WebControls/TWizardStep.php +++ b/framework/Web/UI/WebControls/TWizardStep.php @@ -94,7 +94,7 @@ class TWizardStep extends TView */ public function setStepType($type) { - $type=TPropertyValue::ensureEnum($type,'TWizardStepType'); + $type=TPropertyValue::ensureEnum($type,'Prado\\Web\\UI\\WebControls\\TWizardStepType'); if($type!==$this->getStepType()) { $this->setViewState('StepType',$type,TWizardStepType::Auto); diff --git a/tests/unit/Data/SqlMap/DataMapper/TPropertyAccessTest.php b/tests/unit/Data/SqlMap/DataMapper/TPropertyAccessTest.php index 99118927..0a95e49f 100644 --- a/tests/unit/Data/SqlMap/DataMapper/TPropertyAccessTest.php +++ b/tests/unit/Data/SqlMap/DataMapper/TPropertyAccessTest.php @@ -5,7 +5,7 @@ use Prado\Data\SqlMap\DataMapper\TPropertyAccess; /** - * @package System.Data.SqlMap.DataMapper + * @package System.Data.\SqlMap\\DataMapper.DataMapper */ class TPropertyAccessTest extends PHPUnit_Framework_TestCase { @@ -28,7 +28,7 @@ class TPropertyAccessTest extends PHPUnit_Framework_TestCase self::assertEquals(1, TPropertyAccess::get($testobj, 'a')); self::assertEquals(2, TPropertyAccess::get($testobj, 'b')); - self::setExpectedException('TInvalidPropertyException'); + self::setExpectedException('Prado\\Data\SqlMap\DataMapper\\TInvalidPropertyException'); TPropertyAccess::get($testobj, 'c'); } @@ -67,10 +67,10 @@ class TPropertyAccessTest extends PHPUnit_Framework_TestCase self::assertEquals(1, TPropertyAccess::get($testobj, 'A')); self::assertEquals(2, TPropertyAccess::get($testobj, 'B')); - self::setExpectedException('TInvalidPropertyException'); + self::setExpectedException('Prado\\Data\\SqlMap\\DataMapper\\TInvalidPropertyException'); TPropertyAccess::get($testobj, 'c'); - self::setExpectedException('TInvalidPropertyException'); + self::setExpectedException('Prado\\Data\\SqlMap\\DataMapper\\TInvalidPropertyException'); TPropertyAccess::get($testobj, 'C'); } @@ -96,7 +96,7 @@ class TPropertyAccessTest extends PHPUnit_Framework_TestCase TPropertyAccess::set($testobj, 'c', 30); self::assertEquals(30, TPropertyAccess::get($testobj, 'c')); - self::setExpectedException('TInvalidPropertyException'); + self::setExpectedException('Prado\\Data\\SqlMap\\DataMapper\\TInvalidPropertyException'); TPropertyAccess::get($testobj, 'C'); } @@ -189,10 +189,10 @@ class TPropertyAccessTest extends PHPUnit_Framework_TestCase self::assertNull(TPropertyAccess::get($testobj, 'a.e.c')); self::assertNull(TPropertyAccess::get($testobj, 'a.e.C')); - self::setExpectedException('TInvalidPropertyException'); + self::setExpectedException('Prado\\Data\\SqlMap\\DataMapper\\TInvalidPropertyException'); TPropertyAccess::get($testobj, 'a.c.C'); - self::setExpectedException('TInvalidPropertyException'); + self::setExpectedException('Prado\\Data\\SqlMap\\DataMapper\\TInvalidPropertyException'); TPropertyAccess::get($testobj, 'a.d.C'); } } diff --git a/tests/unit/PradoBaseTest.php b/tests/unit/PradoBaseTest.php index 94abb25e..0b9cd7d6 100644 --- a/tests/unit/PradoBaseTest.php +++ b/tests/unit/PradoBaseTest.php @@ -3,7 +3,7 @@ use Prado\Prado; /** - * @runTestsInSeparateProcesses + * @package System */ class PradoBaseTest extends PHPUnit_Framework_TestCase { diff --git a/tests/unit/Security/TUserManagerTest.php b/tests/unit/Security/TUserManagerTest.php index 146e590b..fff14912 100644 --- a/tests/unit/Security/TUserManagerTest.php +++ b/tests/unit/Security/TUserManagerTest.php @@ -121,10 +121,10 @@ class TUserManagerTest extends PHPUnit_Framework_TestCase { $userManager=new TUserManager (); $userManager->init (self::$config); $guest=$userManager->getUser(null); - self::assertInstanceOf('TUser', $guest); + self::assertInstanceOf('Prado\\Security\\TUser', $guest); self::assertTrue($guest->getIsGuest()); $user=$userManager->getUser('joe'); - self::assertInstanceOf('TUser', $user); + self::assertInstanceOf('Prado\\Security\\TUser', $user); self::assertEquals('joe', $user->getName()); self::assertEquals(array ('Writer'), $user->getRoles()); self::assertFalse($user->getIsGuest()); diff --git a/tests/unit/TComponentTest.php b/tests/unit/TComponentTest.php index 66b90684..033c373f 100644 --- a/tests/unit/TComponentTest.php +++ b/tests/unit/TComponentTest.php @@ -718,7 +718,7 @@ class TComponentTest extends PHPUnit_Framework_TestCase { public function testIsA() { //This doesn't check the IInstanceCheck functionality, separate function - $this->assertTrue($this->component->isa('TComponent')); + $this->assertTrue($this->component->isa('Prado\TComponent')); $this->assertTrue($this->component->isa('NewComponent')); $this->assertFalse($this->component->isa(new FooBehavior)); $this->assertFalse($this->component->isa('FooBehavior')); diff --git a/tests/unit/Web/THttpCookieCollectionTest.php b/tests/unit/Web/THttpCookieCollectionTest.php index 14b3f923..4ddc4da3 100644 --- a/tests/unit/Web/THttpCookieCollectionTest.php +++ b/tests/unit/Web/THttpCookieCollectionTest.php @@ -13,7 +13,7 @@ class THttpCookieCollectionTest extends PHPUnit_Framework_TestCase { public function testConstruct() { $coll=new THttpCookieCollection(); - self::assertInstanceOf('THttpCookieCollection', $coll); + self::assertInstanceOf('Prado\\Web\\THttpCookieCollection', $coll); } public function testInsertAt() { diff --git a/tests/unit/Web/THttpRequestTest.php b/tests/unit/Web/THttpRequestTest.php index 9b8168c3..f11e8c0f 100644 --- a/tests/unit/Web/THttpRequestTest.php +++ b/tests/unit/Web/THttpRequestTest.php @@ -72,13 +72,13 @@ class THttpRequestTest extends PHPUnit_Framework_TestCase { public function testGetUrl() { $request = new THttpRequest(); $request->init(null); - self::assertInstanceOf('TUri', $request->getUrl()); + self::assertInstanceOf('Prado\\Web\\TUri', $request->getUrl()); // Try with $_SERVER['HTTP_HOST'] empty $request=null; $request = new THttpRequest(); $request->init(null); $_SERVER['HTTP_HOST']=''; - self::assertInstanceOf('TUri', $request->getUrl()); + self::assertInstanceOf('Prado\\Web\\TUri', $request->getUrl()); } public function testGetUrlManager() { @@ -122,7 +122,7 @@ class THttpRequestTest extends PHPUnit_Framework_TestCase { $request->setUrlManager('goodmanager'); $request->init(null); self::assertEquals ('goodmanager', $request->getUrlManager()); - self::assertInstanceOf ('TUrlManager',$request->getUrlManagerModule()); + self::assertInstanceOf ('Prado\\Web\\TUrlManager',$request->getUrlManagerModule()); } @@ -281,7 +281,7 @@ class THttpRequestTest extends PHPUnit_Framework_TestCase { $request->init (null); $request->setEnableCookieValidation (false); $cookies=$request->getCookies(); - self::assertInstanceOf('THttpCookieCollection', $cookies); + self::assertInstanceOf('Prado\\Web\\THttpCookieCollection', $cookies); self::assertEquals('0123456789abcdef', $cookies->itemAt('phpsessid')->getValue()); $request = null; @@ -293,7 +293,7 @@ class THttpRequestTest extends PHPUnit_Framework_TestCase { $request->init (null); $request->setEnableCookieValidation (true); $cookies=$request->getCookies(); - self::assertInstanceOf('THttpCookieCollection', $cookies); + self::assertInstanceOf('Prado\\Web\\THttpCookieCollection', $cookies); self::assertEquals('0123456789abcdef', $cookies->itemAt('phpsessid')->getValue()); } @@ -338,7 +338,7 @@ class THttpRequestTest extends PHPUnit_Framework_TestCase { public function testGetIterator() { $request = new THttpRequest (); $request->init(null); - self::assertInstanceOf ('TMapIterator', $request->getIterator()); + self::assertInstanceOf ('Prado\\Collections\\TMapIterator', $request->getIterator()); } public function testGetCount() { diff --git a/tests/unit/Web/THttpResponseTest.php b/tests/unit/Web/THttpResponseTest.php index 9af89900..d9d4b30f 100644 --- a/tests/unit/Web/THttpResponseTest.php +++ b/tests/unit/Web/THttpResponseTest.php @@ -92,7 +92,7 @@ class THttpResponseTest extends PHPUnit_Framework_TestCase { public function testGetCookies() { $response=new THttpResponse (); $response->init (null); - self::assertInstanceOf('THttpCookieCollection', $response->getCookies()); + self::assertInstanceOf('Prado\\Web\\THttpCookieCollection', $response->getCookies()); self::assertEquals(0, $response->getCookies()->getCount()); } diff --git a/tests/unit/Xml/TXmlElementTest.php b/tests/unit/Xml/TXmlElementTest.php index 49bd41ec..c268284a 100644 --- a/tests/unit/Xml/TXmlElementTest.php +++ b/tests/unit/Xml/TXmlElementTest.php @@ -62,7 +62,7 @@ class TXmlElementTest extends PHPUnit_Framework_TestCase { self::assertEquals(null, $element->getElementByTagName('first')); $element->Elements[] = new TXmlElement('first'); $first = $element->getElementByTagName('first'); - self::assertInstanceOf('TXmlElement', $first); + self::assertInstanceOf('Prado\\Xml\\TXmlElement', $first); self::assertEquals('first', $first->getTagName()); } |