Overview

Packages

  • Actions
  • Codegen
  • Controls
    • Base
  • DatabaseAdapters
  • Events
  • None
  • Sessions
  • Tests

Classes

  • AbstractControl_CodeGenerator
  • AjaxTimingForm
  • BasicForm
  • BasicOrmTests
  • BBCodeParser
  • CacheTests
  • CalculatorForm
  • CalculatorWidget
  • ComplexColumn
  • DataRepeaterExample
  • Event
  • ExampleCheckColumn1
  • ExampleCheckColumn2
  • ExampleForm
  • Examples
  • ExampleService
  • ExamplesForm
  • ExampleSingleForm
  • ExpandAsArrayTests
  • HtmlJqDoc
  • InjectForm
  • JavaScriptHelper
  • JqAttributes
  • JqControlGen
  • JqDoc
  • JqIcon
  • Method
  • ModelConnectorTests
  • MyControl
  • MyQSlider_ChangeEvent
  • NavPanel
  • NestedTabForm
  • Option
  • Order
  • PaginatorForm
  • ParamsForm
  • PersistentExampleForm
  • PersonEditPanel
  • PluginEditForm
  • PluginManagerForm
  • Project
  • ProjectEditPanel
  • ProjectListForm
  • ProjectPickerListBox
  • ProjectViewPanel
  • QAbstractCacheProvider
  • QAbstractHtmlTableColumn
  • QAbstractHtmlTableDataColumn
  • QAccordion
  • QAccordion_ActivateEvent
  • QAccordion_BeforeActivateEvent
  • QAccordion_CreateEvent
  • QAccordionBase
  • QAccordionGen
  • QAction
  • QActionControl
  • QAjaxAction
  • QAjaxControlAction
  • QAjaxResponse
  • QAlertAction
  • QApplication
  • QApplicationBase
  • QArchive
  • QAutocomplete
  • QAutocomplete_ChangeEvent
  • QAutocomplete_CloseEvent
  • QAutocomplete_CodeGenerator
  • QAutocomplete_CreateEvent
  • QAutocomplete_FocusEvent
  • QAutocomplete_OpenEvent
  • QAutocomplete_ResponseEvent
  • QAutocomplete_SearchEvent
  • QAutocomplete_SelectEvent
  • QAutocomplete_SourceEvent
  • QAutocompleteBase
  • QAutocompleteBase_CodeGenerator
  • QAutocompleteGen
  • QAutocompleteListItem
  • QBackspaceKeyEvent
  • QBaseClass
  • QBlockControl
  • QBlurControlAction
  • QBlurEvent
  • QBorderCollapse
  • QBorderStyle
  • QBrowserType
  • QButton
  • QButtonBase
  • QCache
  • QCacheDeleteAction
  • QCacheDeleteAllAction
  • QCacheProviderAPC
  • QCacheProviderLocalMemory
  • QCacheProviderLocalMemoryTest
  • QCacheProviderMemcache
  • QCacheProviderNoCache
  • QCacheProviderProxy
  • QCacheSetAction
  • QCalendar
  • QCalendarType
  • QCallType
  • QCausesValidation
  • QCellClickEvent
  • QChangeEvent
  • QCheckBox
  • QCheckBox_CodeGenerator
  • QCheckBoxBase_CodeGenerator
  • QCheckBoxLegacyColumn
  • QCheckBoxList
  • QCheckBoxList_CodeGenerator
  • QCheckBoxListBase_CodeGenerator
  • QClickEvent
  • QCodeGen
  • QCodeGenBase
  • QConfirmAction
  • QContextMenuEvent
  • QControl
  • QControl_CodeGenerator
  • QControlBase
  • QControlBase_CodeGenerator
  • QControlBaseTests
  • QControlCategoryType
  • QControlGrouping
  • QControlLabel
  • QControlProxy
  • QConvertNotation
  • QConvertNotationBase
  • QCrossScripting
  • QCryptography
  • QCss
  • QCssAction
  • QCssClassAction
  • QCssTests
  • QCsvTextBox
  • QCursor
  • QDatabaseBase
  • QDatabaseCodeGen
  • QDatabaseFieldBase
  • QDatabaseFieldType
  • QDatabaseForeignKey
  • QDatabaseIndex
  • QDatabaseResultBase
  • QDatabaseRowBase
  • QDatabaseTests
  • QDataGrid
  • QDataGrid_CheckBoxColumn
  • QDataGrid_CodeGenerator
  • QDataGrid_SortEvent
  • QDataGridBase
  • QDataGridBase_CodeGenerator
  • QDataGridLegacy
  • QDataGridLegacyBase
  • QDataGridLegacyColumn
  • QDataGridLegacyRow
  • QDataGridLegacyRowStyle
  • QDataRepeater
  • QDatepicker
  • QDatepicker_BeforeShowDayEvent
  • QDatepicker_BeforeShowEvent
  • QDatepicker_CalculateWeekEvent
  • QDatepicker_ChangeMonthYearEvent
  • QDatepicker_CloseEvent
  • QDatepicker_SelectEvent
  • QDatepicker_SelectEvent2
  • QDatepickerBase
  • QDatepickerBox
  • QDatepickerBox_BeforeShowDayEvent
  • QDatepickerBox_BeforeShowEvent
  • QDatepickerBox_CalculateWeekEvent
  • QDatepickerBox_ChangeMonthYearEvent
  • QDatepickerBox_CloseEvent
  • QDatepickerBox_CodeGenerator
  • QDatepickerBox_SelectEvent
  • QDatepickerBoxBase
  • QDatepickerBoxBase_CodeGenerator
  • QDatepickerBoxGen
  • QDatepickerGen
  • QDateTime
  • QDateTimePicker
  • QDateTimePicker_CodeGenerator
  • QDateTimePickerBase_CodeGenerator
  • QDateTimePickerFormat
  • QDateTimePickerType
  • QDateTimeSpan
  • QDateTimeTests
  • QDateTimeTextBox
  • QDbBackedFormStateHandler
  • QDbBackedSessionHandler
  • QDialog
  • QDialog_BeforeCloseEvent
  • QDialog_ButtonEvent
  • QDialog_CloseEvent
  • QDialog_CreateEvent
  • QDialog_DragEvent
  • QDialog_DragStartEvent
  • QDialog_DragStopEvent
  • QDialog_FocusEvent
  • QDialog_OpenEvent
  • QDialog_ResizeEvent
  • QDialog_ResizeStartEvent
  • QDialog_ResizeStopEvent
  • QDialogBase
  • QDialogBox
  • QDialogGen
  • QDisplayStyle
  • QDoubleClickEvent
  • QDownArrowKeyEvent
  • QDragDropEvent
  • QDraggable
  • QDraggable_CreateEvent
  • QDraggable_DragEvent
  • QDraggable_StartEvent
  • QDraggable_StopEvent
  • QDraggableBase
  • QDraggableGen
  • QDroppable
  • QDroppable_ActivateEvent
  • QDroppable_CreateEvent
  • QDroppable_DeactivateEvent
  • QDroppable_DropEvent
  • QDroppable_OutEvent
  • QDroppable_OverEvent
  • QDroppableBase
  • QDroppableGen
  • QDropZoneGrouping
  • QEmailAttachment
  • QEmailMessage
  • QEmailServer
  • QEmailStringAttachment
  • QEmailTextBox
  • QEnterKeyEvent
  • QErrorAttribute
  • QEscapeKeyEvent
  • QEvent
  • QFieldset
  • QFile
  • QFileAsset
  • QFileAssetBase
  • QFileAssetDialog
  • QFileAssetType
  • QFileControl
  • QFileFormStateHandler
  • QFilterType
  • QFloatTextBox
  • QFloatTextBox_CodeGenerator
  • QFloatTextBoxBase_CodeGenerator
  • QFocusControlAction
  • QFocusEvent
  • QFocusInEvent
  • QFocusOutEvent
  • QFolder
  • QFontFamily
  • QForm
  • QFormBase
  • QFormGen
  • QFormStateHandler
  • QGridLines
  • QHideCalendarAction
  • QHideDialog
  • QHideDialogBox
  • QHListControl
  • QHListItem
  • QHorizontalAlign
  • QHtml
  • QHtmlAttributeManager
  • QHtmlAttributeManagerBase
  • QHtmlReporter
  • QHtmlTable
  • QHtmlTable_CodeGenerator
  • QHtmlTableBase
  • QHtmlTableCallableColumn
  • QHtmlTableCheckBoxColumn
  • QHtmlTableCheckBoxColumn_ClickEvent
  • QHtmlTableIndexedColumn
  • QHtmlTableLinkColumn
  • QHtmlTableNodeColumn
  • QHtmlTablePropertyColumn
  • QI18n
  • QI18nTests
  • QImageBase
  • QImageBrowser
  • QImageBrowserBase
  • QImageBrowserNav
  • QImageBrowserThumbnails
  • QImageButton
  • QImageControl
  • QImageControlBase
  • QImageFileAsset
  • QImageLabel
  • QImageLabelBase
  • QImageRollover
  • QImageType
  • QIndex
  • QInformixPdoDatabase
  • QInformixPdoDatabaseField
  • QInformixPdoDatabaseResult
  • QInformixPdoDatabaseRow
  • QInputEvent
  • QInstallationValidationResult
  • QInstallationValidator
  • QIntegerTextBox
  • QIntegerTextBox_CodeGenerator
  • QIntegerTextBoxBase_CodeGenerator
  • QJavaScriptAction
  • QJQAction
  • QJQBounceAction
  • QJqButton
  • QJqButton_CreateEvent
  • QJqButtonBase
  • QJqButtonGen
  • QJqCheckBox
  • QJqCheckBox_CreateEvent
  • QJqCheckBoxBase
  • QJqCheckBoxGen
  • QJQHideAction
  • QJQHideEffectAction
  • QJQHighlightAction
  • QJQPulsateAction
  • QJqRadioButton
  • QJqRadioButton_CreateEvent
  • QJqRadioButtonBase
  • QJqRadioButtonGen
  • QJQShakeAction
  • QJQShowAction
  • QJQShowEffectAction
  • QJQSizeAction
  • QJQToggleAction
  • QJQToggleEffectAction
  • QJQTransferAction
  • QJqUiEvent
  • QJqUiPropertyEvent
  • QJsClosure
  • QJsFunction
  • QJsNoQuoteKey
  • QJsParameterList
  • QJsPriority
  • QJsTimer
  • QJsTimerBase
  • QJsVarName
  • QKeyDownEvent
  • QKeyPressEvent
  • QKeyUpEvent
  • QLabel
  • QLabel_CodeGenerator
  • QLabelBase_CodeGenerator
  • QLexer
  • QLinkButton
  • QListBox
  • QListBox_CodeGenerator
  • QListBoxBase
  • QListBoxBase_CodeGenerator
  • QListControl
  • QListControl_CodeGenerator
  • QListControlBase_CodeGenerator
  • QListItem
  • QListItemBase
  • QListItemStyle
  • QManyToManyReference
  • QMenu
  • QMenu_BlurEvent
  • QMenu_CreateEvent
  • QMenu_FocusEvent
  • QMenu_SelectEvent
  • QMenuBase
  • QMenuGen
  • QMimeType
  • QModelConnectorArgumentType
  • QModelConnectorCreateType
  • QModelConnectorEditDlg
  • QModelConnectorOptions
  • QModelConnectorParam
  • QMouseDownEvent
  • QMouseEnterEvent
  • QMouseLeaveEvent
  • QMouseMoveEvent
  • QMouseOutEvent
  • QMouseOverEvent
  • QMouseUpEvent
  • QMultiLevelCacheProvider
  • QMySqlDatabase
  • QMySqlDatabaseField
  • QMySqlDatabaseResult
  • QMySqli5ClusterDatabase
  • QMySqli5Database
  • QMySqli5DatabaseField
  • QMySqli5DatabaseResult
  • QMySqliDatabase
  • QMySqliDatabaseField
  • QMySqliDatabaseResult
  • QMySqliDatabaseRow
  • QNoScriptAjaxAction
  • QNumericTextBox
  • QOnEvent
  • QOracleDatabase
  • QOracleDatabaseField
  • QOracleDatabaseResult
  • QOracleDatabaseRow
  • QOrderedListType
  • QOverflow
  • QPaginatedControl
  • QPaginator
  • QPaginatorBase
  • QPanel
  • QPartialQueryBuilder
  • QPdoDatabase
  • QPdoDatabaseResult
  • QPgConditionILike
  • QPgConditionJsonContains
  • QPgQ
  • QPosition
  • QPostgreSqlDatabase
  • QPostgreSqlDatabaseField
  • QPostgreSqlDatabaseResult
  • QPostgreSqlDatabaseRow
  • QPostgreSqlPdoDatabase
  • QPostgreSqlPdoDatabaseField
  • QPostgreSqlPdoDatabaseResult
  • QPostgreSqlPdoDatabaseRow
  • QProgressbar
  • QProgressbar_ChangeEvent
  • QProgressbar_CompleteEvent
  • QProgressbar_CreateEvent
  • QProgressbarBase
  • QProgressbarGen
  • QQ
  • QQAggregationClause
  • QQAliasTests
  • QQAssociationNode
  • QQAverage
  • QQClause
  • QQColumnNode
  • QQCondition
  • QQConditionAll
  • QQConditionAnd
  • QQConditionBetween
  • QQConditionComparison
  • QQConditionEqual
  • QQConditionExists
  • QQConditionGreaterOrEqual
  • QQConditionGreaterThan
  • QQConditionIn
  • QQConditionIsNotNull
  • QQConditionIsNull
  • QQConditionLessOrEqual
  • QQConditionLessThan
  • QQConditionLike
  • QQConditionLogical
  • QQConditionNone
  • QQConditionNot
  • QQConditionNotBetween
  • QQConditionNotEqual
  • QQConditionNotExists
  • QQConditionNotIn
  • QQConditionNotLike
  • QQConditionOr
  • QQCount
  • QQDistinct
  • QQExpand
  • QQExpandAsArray
  • QQExpandVirtualNode
  • QQFuncTests
  • QQFunctionNode
  • QQGroupBy
  • QQHavingClause
  • QQLimitInfo
  • QQMathNode
  • QQMathOpTests
  • QQMaximum
  • QQMinimum
  • QQNamedValue
  • QQNode
  • QQNoParentNode
  • QQOrderBy
  • QQReverseReferenceNode
  • QQSelect
  • QQSubQueryCountNode
  • QQSubQueryNode
  • QQSubQuerySqlNode
  • QQSum
  • QQTableNode
  • QQuery
  • QQueryBuilder
  • QQueryExpansion
  • QQVirtualNode
  • QRadioButton
  • QRadioButtonList
  • QRadioButtonList_CodeGenerator
  • QRadioButtonListBase_CodeGenerator
  • QRedirectAction
  • QReference
  • QRegex
  • QRegisterClickPositionAction
  • QRepeatDirection
  • QRequestMode
  • QResetTimerAction
  • QResizable
  • QResizable_CreateEvent
  • QResizable_ResizeEvent
  • QResizable_StartEvent
  • QResizable_StopEvent
  • QResizableBase
  • QResizableGen
  • QResizeHandleDirection
  • QRestServiceCodeGen
  • QReverseReference
  • QRssCategory
  • QRssFeed
  • QRssImage
  • QRssItem
  • QSampleControl
  • QSampleTranslation
  • QSelectable
  • QSelectable_CreateEvent
  • QSelectable_SelectedEvent
  • QSelectable_SelectingEvent
  • QSelectable_StartEvent
  • QSelectable_StopEvent
  • QSelectable_UnselectedEvent
  • QSelectable_UnselectingEvent
  • QSelectableBase
  • QSelectableGen
  • QSelectControlAction
  • QSelectEvent
  • QSelectionMode
  • QSelectMenu
  • QSelectMenu_ChangeEvent
  • QSelectMenu_CloseEvent
  • QSelectMenu_CreateEvent
  • QSelectMenu_FocusEvent
  • QSelectMenu_OpenEvent
  • QSelectMenu_SelectEvent
  • QSelectMenuBase
  • QSelectMenuGen
  • QServerAction
  • QServerControlAction
  • QSessionFormStateHandler
  • QSetValueAction
  • QShowCalendarAction
  • QShowDialog
  • QShowDialogBox
  • QSlider
  • QSlider_ChangeEvent
  • QSlider_CodeGenerator
  • QSlider_CreateEvent
  • QSlider_SlideEvent
  • QSlider_StartEvent
  • QSlider_StopEvent
  • QSliderBase
  • QSliderBase_CodeGenerator
  • QSliderGen
  • QSoapMethod
  • QSoapParameter
  • QSoapService
  • QSortable
  • QSortable_ActivateEvent
  • QSortable_BeforeStopEvent
  • QSortable_ChangeEvent
  • QSortable_CreateEvent
  • QSortable_DeactivateEvent
  • QSortable_OutEvent
  • QSortable_OverEvent
  • QSortable_ReceiveEvent
  • QSortable_RemoveEvent
  • QSortable_SortEvent
  • QSortable_StartEvent
  • QSortable_StopEvent
  • QSortable_UpdateEvent
  • QSortableBase
  • QSortableGen
  • QSpinner
  • QSpinner_ChangeEvent
  • QSpinner_CreateEvent
  • QSpinner_SpinEvent
  • QSpinner_StartEvent
  • QSpinner_StopEvent
  • QSpinnerBase
  • QSpinnerGen
  • QSqlColumn
  • QSqLite3PdoDatabase
  • QSqLite3PdoDatabaseField
  • QSqLite3PdoDatabaseResult
  • QSqLite3PdoDatabaseRow
  • QSqlServer2005Database
  • QSqlServer2005DatabaseField
  • QSqlServer2005DatabaseResult
  • QSqlServer2005DatabaseRow
  • QSqlServerDatabase
  • QSqlServerDatabaseField
  • QSqlServerDatabaseResult
  • QSqlServerDatabaseRow
  • QSqlTable
  • QStack
  • QStopPropagationAction
  • QString
  • QStringTest
  • QTabKeyEvent
  • QTabs
  • QTabs_ActivateEvent
  • QTabs_BeforeActivateEvent
  • QTabs_BeforeLoadEvent
  • QTabs_CreateEvent
  • QTabs_LoadEvent
  • QTabsBase
  • QTabsGen
  • QTag
  • QTagStyler
  • QTerminateAction
  • QTestControl
  • QTestForm
  • QTextAlign
  • QTextBox
  • QTextBox_CodeGenerator
  • QTextBoxBase
  • QTextBoxBase_CodeGenerator
  • QTextMode
  • QTimer
  • QTimerExpiredEvent
  • QTimerTests
  • QToggleCssClassAction
  • QToggleDisplayAction
  • QToggleEnableAction
  • QTranslationPoParser
  • QTreeNav
  • QTreeNavItem
  • QType
  • QTypeTable
  • QTypeTests
  • QUnitTestCaseBase
  • QUnorderedListStyle
  • QUpArrowKeyEvent
  • QUrlTextBox
  • QVerticalAlign
  • QVirtualAttributeColumn
  • QWaitIcon
  • QWatcher
  • QWatcherBase
  • QWatcherCache
  • QWatcherDB
  • QWatcherNone
  • QWriteBox
  • RecordsSummary
  • RefreshForm
  • SampleComposite
  • SampleForm
  • SelectableLabel
  • SelectForm
  • SpeedForm
  • TestImageBrowser
  • UrlForm

Interfaces

  • ICacheAction
  • QDataList_CodeGenerator_Interface
  • QTranslationBase

Traits

  • QDataBinder
  • QListItemManager
  • QModelTrait

Exceptions

  • QCallerException
  • QCrossScriptingException
  • QCryptographyException
  • QDatabaseExceptionBase
  • QDataBindException
  • QDateTimeNullException
  • QEmailException
  • QIndexOutOfRangeException
  • QInformixPdoDatabaseException
  • QInvalidCastException
  • QInvalidFormStateException
  • QMySqliDatabaseException
  • QOptimisticLockingException
  • QOracleDatabaseException
  • QPdoDatabaseException
  • QPoParserException
  • QPostgreSqlDatabaseException
  • QPostgreSqlPdoDatabaseException
  • QRemoteAdminDeniedException
  • QSqLite3PdoDatabaseException
  • QSqlServer2005DatabaseException
  • QSqlServerDatabaseException
  • QUndefinedMethodException
  • QUndefinedPrimaryKeyException
  • QUndefinedPropertyException

Functions

  • __database_check_error
  • __QForm_EvaluateTemplate_ObHandler
  • _b
  • _indent
  • _nl
  • _p
  • _r
  • _t
  • _tp
  • _tr
  • array_trim
  • beginsWith
  • CamelCaseFromDash
  • CastToInt
  • DataGridEvalHandleError
  • DisplayMonospacedText
  • endsWith
  • GO_BACK
  • jq_anytime_gen
  • jq_control_gen
  • jq_inc_gen
  • jq_indent
  • PrintExplainStatement
  • PrintInstructions
  • QcubedHandleCodeGenParseError
  • QcubedHandleError
  • QcubedHandleException
  • QCubedShutdown
  • QDateTimeErrorHandler
  • trimOffEnd
  • trimOffFront
  • Overview
  • Package
  • Class
  1: <?php
  2: 
  3: /**
  4:  * 
  5:  * @package Tests
  6:  */
  7: class QCssTests extends QUnitTestCaseBase {
  8:     
  9:     protected function helpTest($objTestDataArray) {
 10:         $strValue = $objTestDataArray["Value"];
 11:         $strAttrs = QHtml::FormatLength($strValue);
 12: 
 13:         $strMessage =
 14:             $objTestDataArray["Msg"] .
 15:             " Expected: '" . $objTestDataArray["Expected"] . "'" .
 16:             " Obtained: '" . $strAttrs . "'";
 17:         $this->assertEquals($objTestDataArray["Expected"], $strAttrs, $strMessage);
 18:     }
 19: 
 20:     public function testFormatLength() {
 21:         $objCaseArray = array( 
 22:             array(
 23:                 "Value" => "0", "Expected" => "0", "Msg" => "String zero renders with no 'px'"
 24:             ),
 25:             array(
 26:                 "Value" => "0.0", "Expected" => "0", "Msg" => "String '0.0' renders with no 'px'"
 27:             ),
 28:             array(
 29:                 "Value" => (int)0, "Expected" => "0", "Msg" => "Integer zero renders with no 'px'"
 30:             ),
 31:             array(
 32:                 "Value" => (float)0.0, "Expected" => "0", "Msg" => "Float zero renders with no 'px'"
 33:             ),
 34:             array(
 35:                 "Value" => (double)0.0, "Expected" => "0", "Msg" => "Double zero renders with no 'px'"
 36:             ),
 37:             array(
 38:                 "Value" => "0px", "Expected" => "0px", "Msg" => "String value renders with no 'px'"
 39:             ),
 40:             array(
 41:                 "Value" => "0px", "Expected" => "0px", "Msg" => "String zero with 'px' renders with no additional 'px'"
 42:             ),
 43: 
 44:             array(
 45:                 "Value" => "1", "Expected" => "1px", "Msg" => "String '1' renders with 'px'"
 46:             ),
 47:             array(
 48:                 "Value" => "1.0", "Expected" => "1px", "Msg" => "String '1.0' renders with 'px'"
 49:             ),
 50:             array(
 51:                 "Value" => "1.1", "Expected" => "1.1px", "Msg" => "String '1.1' renders with 'px'"
 52:             ),
 53:             array(
 54:                 "Value" => (int)1, "Expected" => "1px", "Msg" => "Integer 1 renders with 'px'"
 55:             ),
 56:             array(
 57:                 "Value" => (float)1.0, "Expected" => "1px", "Msg" => "Float 1 renders with 'px'"
 58:             ),
 59:             array(
 60:                 "Value" => (float)1.1, "Expected" => "1.1px", "Msg" => "Float 1.1 renders with 'px'"
 61:             ),
 62:             array(
 63:                 "Value" => (double)1.0, "Expected" => "1px", "Msg" => "Double 1 renders with 'px'"
 64:             ),
 65:             array(
 66:                 "Value" => (double)1.1, "Expected" => "1.1px", "Msg" => "Double 1.1 renders with 'px'"
 67:             ),
 68:             array(
 69:                 "Value" => "1px", "Expected" => "1px", "Msg" => "String value renders with no 'px'"
 70:             ),
 71:             array(
 72:                 "Value" => "1px", "Expected" => "1px", "Msg" => "String with 'px' renders with no additional 'px'"
 73:             ),
 74: 
 75:             array(
 76:                 "Value" => "0 0 0 0", "Expected" => "0 0 0 0", "Msg" => "String with many values renders with no 'px'"
 77:             ),
 78:             array(
 79:                 "Value" => "0px 0px 0px 0px", "Expected" => "0px 0px 0px 0px", "Msg" => "String with many values renders with no additional 'px'"
 80:             ),
 81:             array(
 82:                 "Value" => "1 1 1 1", "Expected" => "1 1 1 1", "Msg" => "String with many values renders with no 'px'"
 83:             ),
 84:             array(
 85:                 "Value" => "1px 1px 1px 1px", "Expected" => "1px 1px 1px 1px", "Msg" => "String with many values renders with no additional 'px'"
 86:             ),
 87:             array(
 88:                 "Value" => "dummy", "Expected" => "dummy", "Msg" => "String with not a number value renders with no 'px'"
 89:             ),
 90:             array(
 91:                 "Value" => "the dumbest", "Expected" => "the dumbest", "Msg" => "String with multiple not a number values renders with no 'px'"
 92:             )
 93:         );
 94: 
 95:         foreach($objCaseArray as $objCase) {
 96:             $this->helpTest($objCase);
 97:         }
 98: 
 99:     }
100: 
101:     protected function helpTest2($objTestDataArray) {
102:         $strOldValue = $objTestDataArray["OldValue"];
103:         $newValue = $objTestDataArray["NewValue"];
104:         $blnChanged = QHtml::SetLength($strOldValue, $newValue);
105: 
106:         $this->assertEquals($objTestDataArray["Changed"], $blnChanged);
107:         $this->assertEquals($objTestDataArray["Expected"], $strOldValue);
108:         // problem with sending a percent sign into message, so we just use default message.
109:     }
110: 
111:     public function testSetLength() {
112:         $objCaseArray = array(
113:             array(
114:                 "OldValue" => "0", "NewValue" => "0", "Changed"=>false, "Expected" => "0", "Msg" => "Zero set to zero."
115:             ),
116:             array(
117:                 "OldValue" => "1px", "NewValue" => "2em", "Changed"=>true, "Expected" => "2em", "Msg" => "1px changed to 2em."
118:             ),
119:             array(
120:                 "OldValue" => "1px", "NewValue" => "1px", "Changed"=>false, "Expected" => "1px", "Msg" => "1px not changed."
121:             ),
122:             array(
123:                 "OldValue" => "1px", "NewValue" => "+1", "Changed"=>true, "Expected" => "2px", "Msg" => "1 added to 1px."
124:             ),
125:             array(
126:                 "OldValue" => "1px", "NewValue" => "-1", "Changed"=>true, "Expected" => "0px", "Msg" => "1 subtracted from 1px." //??? should we drop the px?
127:             ),
128:             array(
129:                 "OldValue" => "1em", "NewValue" => "/2", "Changed"=>true, "Expected" => "0.5em", "Msg" => "1em divided in half."
130:             ),
131:             array(
132:                 "OldValue" => "1em", "NewValue" => "*2", "Changed"=>true, "Expected" => "2em", "Msg" => "1em multiplied by 2."
133:             ),
134:             array(
135:                 "OldValue" => "1.1em", "NewValue" => "*2", "Changed"=>true, "Expected" => "2.2em", "Msg" => "1.1em multiplied by 2."
136:             ),
137:             array(
138:                 "OldValue" => '10%', "NewValue" => "*2", "Changed"=>true, "Expected" => '20%', "Msg" => '10 percent multiplied by 2.'
139:             )
140:         );
141: 
142:         foreach($objCaseArray as $objCase) {
143:             $this->helpTest2($objCase);
144:         }
145:     }
146: 
147:     protected function helpTestAddClass($objTestDataArray) {
148:         $strOldValue = $objTestDataArray["OldValue"];
149:         $newValue = $objTestDataArray["NewValue"];
150:         $blnChanged = QHtml::AddClass($strOldValue, $newValue);
151: 
152:         $this->assertEquals($objTestDataArray["Changed"], $blnChanged);
153:         $this->assertEquals($objTestDataArray["Expected"], $strOldValue);
154:         // problem with sending a percent sign into message, so we just use default message.
155:     }
156: 
157:     public function testAddClass() {
158:         $objCaseArray = array(
159:             array(
160:                 "OldValue" => "", "NewValue" => "test", "Changed"=>true, "Expected" => "test"
161:             ),
162:             array(
163:                 "OldValue" => "test", "NewValue" => "test", "Changed"=>false, "Expected" => "test"
164:             ),
165:             array(
166:                 "OldValue" => "test class2", "NewValue" => "test", "Changed"=>false, "Expected" => "test class2"
167:             ),
168:             array(
169:                 "OldValue" => "test", "NewValue" => "class2", "Changed"=>true, "Expected" => "test class2"
170:             ),
171:             array(
172:                 "OldValue" => "test", "NewValue" => "class2 class3", "Changed"=>true, "Expected" => "test class2 class3"
173:             )
174:         );
175: 
176:         foreach($objCaseArray as $objCase) {
177:             $this->helpTestAddClass($objCase);
178:         }
179:     }
180: 
181:     protected function helpTestRemoveClass($objTestDataArray) {
182:         $strOldValue = $objTestDataArray["OldValue"];
183:         $newValue = $objTestDataArray["NewValue"];
184:         $blnChanged = QHtml::RemoveClass($strOldValue, $newValue);
185: 
186:         $this->assertEquals($objTestDataArray["Changed"], $blnChanged);
187:         $this->assertEquals($objTestDataArray["Expected"], $strOldValue);
188:         // problem with sending a percent sign into message, so we just use default message.
189:     }
190: 
191:     public function testRemoveClass() {
192:         $objCaseArray = array(
193:             array(
194:                 "OldValue" => "", "NewValue" => "test", "Changed"=>false, "Expected" => ""
195:             ),
196:             array(
197:                 "OldValue" => "test", "NewValue" => "test", "Changed"=>true, "Expected" => ""
198:             ),
199:             array(
200:                 "OldValue" => "test class2", "NewValue" => "test", "Changed"=>true, "Expected" => "class2"
201:             ),
202:             array(
203:                 "OldValue" => "test", "NewValue" => "class2", "Changed"=>false, "Expected" => "test"
204:             ),
205:             array(
206:                 "OldValue" => "test class2 class3", "NewValue" => "test class3", "Changed"=>true, "Expected" => "class2"
207:             )
208:         );
209: 
210:         foreach($objCaseArray as $objCase) {
211:             $this->helpTestRemoveClass($objCase);
212:         }
213:     }
214: 
215:     public function testJavascriptDataConversions() {
216:         $objCaseArray = array(
217:             array(
218:                 "Value" => "bob", "Expected" => "bob"
219:             ),
220:             array(
221:                 "Value" => "Bob", "Expected" => "-bob"
222:             ),
223:             array(
224:                 "Value" => "bobSmith", "Expected" => "bob-smith"
225:             ),
226:             array(
227:                 "Value" => "bobSmithJones", "Expected" => "bob-smith-jones"
228:             )
229:         );
230: 
231:         foreach($objCaseArray as $objCase) {
232:             $newValue = JavaScriptHelper::dataNameFromCamelCase($objCase["Value"]);
233:             $this->assertEquals($objCase["Expected"], $newValue);
234:         }
235: 
236:         $objCaseArray = array(
237:             array(
238:                 "Value" => "bob", "Expected" => "bob"
239:             ),
240:             array(
241:                 "Value" => "-bob", "Expected" => "Bob"
242:             ),
243:             array(
244:                 "Value" => "bob-smith", "Expected" => "bobSmith"
245:             ),
246:             array(
247:                 "Value" => "bob-smith-jones", "Expected" => "bobSmithJones"
248:             )
249:         );
250: 
251:         foreach($objCaseArray as $objCase) {
252:             $newValue = JavaScriptHelper::dataNameToCamelCase($objCase["Value"]);
253:             $this->assertEquals($objCase["Expected"], $newValue);
254:         }
255: 
256:     }
257: 
258: 
259: }
API documentation generated by ApiGen