From 33b2284955a8f0015922d4c69c5082141b584f27 Mon Sep 17 00:00:00 2001 From: wei <> Date: Tue, 5 Dec 2006 23:37:07 +0000 Subject: load the inlineeditor textbox in client side onload. --- .gitattributes | 10 ++ .../Data/SqlMap/Configuration/TParameterMap.php | 4 +- framework/Data/SqlMap/Configuration/TResultMap.php | 4 +- .../Data/SqlMap/Configuration/TResultProperty.php | 4 +- .../Data/SqlMap/DataMapper/TPropertyAccess.php | 92 ++++++++------ framework/Data/SqlMap/DataMapper/TSqlMapCache.php | 136 ++++++++++----------- .../Data/SqlMap/DataMapper/TSqlMapException.php | 30 +---- framework/Web/Javascripts/js/compressed/ajax.js | 2 +- framework/Web/Javascripts/js/debug/ajax.js | 1 + framework/Web/Javascripts/prado/inlineeditor.js | 1 + .../active-controls/protected/pages/GerTurno2.page | 16 +++ .../active-controls/protected/pages/GerTurno2.php | 53 ++++++++ .../active-controls/protected/pages/Home.php | 11 ++ .../protected/pages/InPlaceWithValidator.page | 78 ++++++++++++ .../protected/pages/InPlaceWithValidator.php | 13 ++ .../active-controls/protected/pages/Master1.php | 7 ++ .../active-controls/protected/pages/Master1.tpl | 14 +++ .../protected/pages/MasterTest1.page | 14 +++ .../protected/pages/NullStateTest.page | 10 ++ .../protected/pages/NullStateTest.php | 11 ++ tests/simple_unit/SqlMap/common.php | 2 +- tests/simple_unit/SqlMap/sqlite/backup.db | Bin 32768 -> 24576 bytes tests/simple_unit/SqlMap/sqlite/tests.db | Bin 32768 -> 24576 bytes 23 files changed, 374 insertions(+), 139 deletions(-) create mode 100644 tests/FunctionalTests/active-controls/protected/pages/GerTurno2.page create mode 100644 tests/FunctionalTests/active-controls/protected/pages/GerTurno2.php create mode 100644 tests/FunctionalTests/active-controls/protected/pages/Home.php create mode 100644 tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.page create mode 100644 tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.php create mode 100644 tests/FunctionalTests/active-controls/protected/pages/Master1.php create mode 100644 tests/FunctionalTests/active-controls/protected/pages/Master1.tpl create mode 100644 tests/FunctionalTests/active-controls/protected/pages/MasterTest1.page create mode 100644 tests/FunctionalTests/active-controls/protected/pages/NullStateTest.page create mode 100644 tests/FunctionalTests/active-controls/protected/pages/NullStateTest.php diff --git a/.gitattributes b/.gitattributes index 1fc7e06e..2a47c908 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2118,8 +2118,18 @@ tests/FunctionalTests/active-controls/protected/pages/DelayedCallback.page -text tests/FunctionalTests/active-controls/protected/pages/DelayedCallback.php -text tests/FunctionalTests/active-controls/protected/pages/EventTriggeredCallback.page -text tests/FunctionalTests/active-controls/protected/pages/EventTriggeredCallback.php -text +tests/FunctionalTests/active-controls/protected/pages/GerTurno2.page -text +tests/FunctionalTests/active-controls/protected/pages/GerTurno2.php -text +tests/FunctionalTests/active-controls/protected/pages/Home.php -text +tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.page -text +tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.php -text tests/FunctionalTests/active-controls/protected/pages/LTemplate.php -text tests/FunctionalTests/active-controls/protected/pages/LTemplate.tpl -text +tests/FunctionalTests/active-controls/protected/pages/Master1.php -text +tests/FunctionalTests/active-controls/protected/pages/Master1.tpl -text +tests/FunctionalTests/active-controls/protected/pages/MasterTest1.page -text +tests/FunctionalTests/active-controls/protected/pages/NullStateTest.page -text +tests/FunctionalTests/active-controls/protected/pages/NullStateTest.php -text tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.page -text tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.php -text tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.page -text diff --git a/framework/Data/SqlMap/Configuration/TParameterMap.php b/framework/Data/SqlMap/Configuration/TParameterMap.php index 8d09d9a9..e4d77a91 100644 --- a/framework/Data/SqlMap/Configuration/TParameterMap.php +++ b/framework/Data/SqlMap/Configuration/TParameterMap.php @@ -155,7 +155,7 @@ class TParameterMap extends TComponent * @param mixed object to obtain the property from. * @param TParameterProperty parameter property. * @return mixed property value. - * @throws TSqlMapExecutionException if property access is invalid. + * @throws TSqlMapException if property access is invalid. */ protected function getObjectValue($object,$property) { @@ -165,7 +165,7 @@ class TParameterMap extends TComponent } catch (TInvalidPropertyException $e) { - throw new TSqlMapExecutionException( + throw new TSqlMapException( 'sqlmap_unable_to_get_property_for_parameter', $this->getID(), $property->getProperty(), get_class($object)); } diff --git a/framework/Data/SqlMap/Configuration/TResultMap.php b/framework/Data/SqlMap/Configuration/TResultMap.php index fa798dc2..5c608e77 100644 --- a/framework/Data/SqlMap/Configuration/TResultMap.php +++ b/framework/Data/SqlMap/Configuration/TResultMap.php @@ -155,7 +155,7 @@ class TResultMap extends TComponent * Create a new instance of the class of this result map. * @param TSqlMapTypeHandlerRegistry type handler registry. * @return mixed new result object. - * @throws TSqlMapExecutionException + * @throws TSqlMapException */ public function createInstanceOfResult($registry) { @@ -169,7 +169,7 @@ class TResultMap extends TComponent } catch (TSqlMapException $e) { - throw new TSqlMapExecutionException( + throw new TSqlMapException( 'sqlmap_unable_to_create_new_instance', $this->getClass(), get_class($handler), $this->getID()); } diff --git a/framework/Data/SqlMap/Configuration/TResultProperty.php b/framework/Data/SqlMap/Configuration/TResultProperty.php index e8fc5c38..884f1a78 100644 --- a/framework/Data/SqlMap/Configuration/TResultProperty.php +++ b/framework/Data/SqlMap/Configuration/TResultProperty.php @@ -282,10 +282,12 @@ class TResultProperty extends TComponent { if(class_exists($type = $this->getType(), false)) //NO force autoloading { + if($type==='TList') + return self::LIST_TYPE; $class = new ReflectionClass($type); if($class->isSubclassOf('TList')) return self::LIST_TYPE; - if($class->inmplementsInterface('ArrayAccess')) + if($class->implementsInterface('ArrayAccess')) return self::ARRAY_TYPE; } if(strtolower($type) == 'array') diff --git a/framework/Data/SqlMap/DataMapper/TPropertyAccess.php b/framework/Data/SqlMap/DataMapper/TPropertyAccess.php index fea94fa4..901072ea 100644 --- a/framework/Data/SqlMap/DataMapper/TPropertyAccess.php +++ b/framework/Data/SqlMap/DataMapper/TPropertyAccess.php @@ -1,41 +1,54 @@ + * @link http://www.pradosoft.com/ + * @copyright Copyright © 2005-2007 PradoSoft + * @license http://www.pradosoft.com/license/ + * @version $Id$ + * @package System.Data.SqlMap.DataMapper + */ +/** + * TPropertyAccess class provides dot notation stype property access and setting. + * + * Access object's properties (and subproperties) using dot path notation. + * The following are equivalent. + * + * echo $obj->property1; + * echo $obj->getProperty1(); + * echo $obj['property1']; //$obj may be an array or object + * echo TPropertyAccess($obj, 'property1'); + * + * + * Setting a property value. + * + * $obj1->propert1 = 'hello'; + * $obj->setProperty('hello'); + * $obj['property1'] = 'hello'; //$obj may be an array or object + * TPropertyAccess($obj, 'property1', 'hello'); + * + * + * Subproperties are supported using the dot notation. E.g. + * + * echo $obj->property1->property2->property3 + * echo TPropertyAccess::get($obj, 'property1.property2.property3'); + * + * + * @author Wei Zhuo + * @version $Id$ + * @package System.Data.SqlMap.DataMapper + * @since 3.1 + */ class TPropertyAccess { - private $_obj; - private $_performance=false; - - public function __construct($obj,$performance=false) - { - $this->_obj = $obj; - $this->_performance=$performance; - } - - public function __get($name) - { - return self::get($this->_obj,$name,$this->_performance); - } - - public function __set($name,$value) - { - self::set($this->_obj,$name,$value,$this->_performance); - } - /** - * Evaluates the data value at the specified field. - * - If the data is an array, then the field is treated as an array index - * and the corresponding element value is returned; - * - If the data is a TMap or TList object, then the field is treated as a key - * into the map or list, and the corresponding value is returned. - * - If the data is an object, the field is treated as a property or subproperty - * defined with getter methods. For example, if the object has a method called - * getMyValue(), then field 'MyValue' will retrive the result of this method call. - * If getMyValue() returns an object which contains a method getMySubValue(), - * then field 'MyValue.MySubValue' will return that method call result. - * @param mixed data containing the field value, can be an array, TMap, TList or object. - * @param mixed field value - * @return mixed value at the specified field - * @throw TInvalidDataValueException if field or data is invalid + * Gets the property value. + * @param mixed object or path. + * @param string property path. + * @return mixed property value. + * @throws TInvalidDataValueException if property path is invalid. */ public static function get($object,$path) { @@ -67,6 +80,11 @@ class TPropertyAccess return $object; } + /** + * @param mixed object or array + * @param string property path. + * @return boolean true if property path is valid + */ public static function has($object, $path) { if(!is_array($object) && !is_object($object)) @@ -96,6 +114,13 @@ class TPropertyAccess return true; } + /** + * Sets the property value. + * @param mixed object or array + * @param string property path. + * @param mixed new property value. + * @throws TInvalidDataValueException if property path is invalid. + */ public static function set(&$originalObject, $path, $value) { $properties = explode('.', $path); @@ -105,7 +130,6 @@ class TPropertyAccess else $object = &$originalObject; - //var_dump($object); if(is_array($object) || $object instanceof ArrayAccess) { $object[$prop] = $value; diff --git a/framework/Data/SqlMap/DataMapper/TSqlMapCache.php b/framework/Data/SqlMap/DataMapper/TSqlMapCache.php index 5cb9cbcb..a47ed52a 100644 --- a/framework/Data/SqlMap/DataMapper/TSqlMapCache.php +++ b/framework/Data/SqlMap/DataMapper/TSqlMapCache.php @@ -7,20 +7,9 @@ * @copyright Copyright © 2005-2007 PradoSoft * @license http://www.pradosoft.com/license/ * @version $Id$ - * @package System.DataAccess.SQLMap + * @package System.Data.SqlMap.DataMapper */ -interface ISqLMapCache -{ - public function remove($key); - - public function flush(); - - public function get($key); - - public function set($key, $value); -} - /** * Allow different implementation of caching strategy. See TSqlMapFifoCache * for a first-in-first-out implementation. See TSqlMapLruCache for @@ -28,10 +17,10 @@ interface ISqLMapCache * * @author Wei Zhuo * @version $Id$ - * @package System.DataAccess.SQLMap - * @since 3.0 + * @package System.Data.SqlMap.DataMapper + * @since 3.1 */ -abstract class TSqlMapCache implements ISqlMapCache +abstract class TSqlMapCache implements ICache { protected $_keyList; protected $_cache; @@ -48,11 +37,18 @@ abstract class TSqlMapCache implements ISqlMapCache $this->_keyList = new TList; } + /** + * Maximum number of items to cache. Default size is 100. + * @param int cache size. + */ public function setCacheSize($value) { $this->_cacheSize=TPropertyValue::ensureInteger($value,100); } + /** + * @return int cache size. + */ public function getCacheSize() { return $this->_cacheSize; @@ -61,7 +57,7 @@ abstract class TSqlMapCache implements ISqlMapCache /** * @return object the object removed if exists, null otherwise. */ - public function remove($key) + public function delete($key) { $object = $this->get($key); $this->_cache->remove($key); @@ -78,6 +74,13 @@ abstract class TSqlMapCache implements ISqlMapCache $this->_cache->clear(); } + /** + * @throws TSqlMapException not implemented. + */ + public function add($id,$value,$expire=0,$dependency=null) + { + throw new TSqlMapException('sqlmap_use_set_to_store_cache'); + } } /** @@ -86,8 +89,8 @@ abstract class TSqlMapCache implements ISqlMapCache * * @author Wei Zhuo * @version $Id$ - * @package System.DataAccess.SQLMap - * @since 3.0 + * @package System.Data.SqlMap.DataMapper + * @since 3.1 */ class TSqlMapFifoCache extends TSqlMapCache { @@ -100,11 +103,12 @@ class TSqlMapFifoCache extends TSqlMapCache } /** - * Adds an item with the specified key and value into cached data. + * Stores a value identified by a key into cache. + * The expire and dependency parameters are ignored. * @param string cache key * @param mixed value to cache. */ - public function set($key, $value) + public function set($key, $value,$expire=0,$dependency=null) { $this->_cache->add($key, $value); $this->_keyList->add($key); @@ -122,8 +126,8 @@ class TSqlMapFifoCache extends TSqlMapCache * * @author Wei Zhuo * @version $Id$ - * @package System.DataAccess.SQLMap - * @since 3.0 + * @package System.Data.SqlMap.DataMapper + * @since 3.1 */ class TSqlMapLruCache extends TSqlMapCache { @@ -138,16 +142,15 @@ class TSqlMapLruCache extends TSqlMapCache $this->_keyList->add($key); return $this->_cache->itemAt($key); } - else - return null; } /** - * Adds an item with the specified key and value into cached data. - * @param string cache key - * @param mixed value to cache. + * Stores a value identified by a key into cache. + * The expire and dependency parameters are ignored. + * @param string the key identifying the value to be cached + * @param mixed the value to be cached */ - public function set($key, $value) + public function set($key, $value,$expire=0,$dependency=null) { $this->_cache->add($key, $value); $this->_keyList->add($key); @@ -159,71 +162,66 @@ class TSqlMapLruCache extends TSqlMapCache } } -class TSqlMapApplicationCache implements ISqlMapCache +/** + * TSqlMapApplicationCache uses the default Prado application cache for + * caching SqlMap results. + * + * @author Wei Zhuo + * @version $Id$ + * @package System.Data.SqlMap.DataMapper + * @since 3.1 + */ +class TSqlMapApplicationCache implements ICache { - private $_cache; - private $_expiry=0; - private $_property=array(); - private $_cacheModelID; - - public function __sleep() - { - $this->_cache = null; - return array_keys(get_object_vars($this)); - } - - public function remove($key) + /** + * @param string item to be deleted. + */ + public function delete($key) { $this->getCache()->delete($key); } + /** + * Deletes all items in the cache. + */ public function flush() { $this->getCache()->flush(); } + /** + * @return mixed Gets a cached object with the specified key. + */ public function get($key) { $result = $this->getCache()->get($key); return $result === false ? null : $result; } - public function set($key, $value) - { - $this->getCache()->set($key, $value, $this->_expiry); - } - - public function configure($model, $properties) + /** + * Stores a value identified by a key into cache. + * @param string the key identifying the value to be cached + * @param mixed the value to be cached + */ + public function set($key, $value,$expire=0,$dependency=null) { - $this->_property = $properties; - $this->_cacheModelID = $model->getID(); + $this->getCache()->set($key, $value, $expire,$dependency); } + /** + * @return ICache Application cache instance. + */ protected function getCache() { - if(is_null($this->_cache)) - $this->initialize(); - return $this->_cache; + return Prado::getApplication()->getCache(); } - protected function initialize() + /** + * @throws TSqlMapException not implemented. + */ + public function add($id,$value,$expire=0,$dependency=null) { - if(isset($this->_property['expiry'])) - $this->_expiry = intval($this->_property['expiry']); - - if(isset($this->_property['cacheModule'])) - { - $id = $this->_property['cacheModule']; - $this->_cache = Prado::getApplication()->getModule($id); - } - else - { - $this->_cache = Prado::getApplication()->getCache(); - } - - if(!($this->_cache instanceof ICache)) - throw new TSqlMapConfigurationException( - 'sqlmap_invalid_prado_cache', $this->_cacheModelID); + throw new TSqlMapException('sqlmap_use_set_to_store_cache'); } } diff --git a/framework/Data/SqlMap/DataMapper/TSqlMapException.php b/framework/Data/SqlMap/DataMapper/TSqlMapException.php index 9a2db478..52fedb13 100644 --- a/framework/Data/SqlMap/DataMapper/TSqlMapException.php +++ b/framework/Data/SqlMap/DataMapper/TSqlMapException.php @@ -54,31 +54,6 @@ class TSqlMapConfigurationException extends TSqlMapException } -class TUndefinedAttributeException extends TSqlMapConfigurationException -{ - public function __construct($attr, $node, $object, $file) - { - parent::__construct( - 'sqlmap_undefined_attribute', get_class($object), $attr, - htmlentities($node->asXml()),$file); - } -} - -class TSqlMapExecutionException extends TSqlMapException -{ -} - -class TSqlMapQueryExecutionException extends TSqlMapExecutionException -{ - protected $parent; - public function __construct($statement, $exception) - { - $this->parent = $exception; - parent::__construct('sqlmap_query_execution_error', - $statement->getID(), $exception->getMessage()); - } -} - class TSqlMapUndefinedException extends TSqlMapException { @@ -88,12 +63,9 @@ class TSqlMapDuplicateException extends TSqlMapException { } -class TSqlMapConnectionException extends TSqlMapException -{ -} class TInvalidPropertyException extends TSqlMapException { - } + ?> \ No newline at end of file diff --git a/framework/Web/Javascripts/js/compressed/ajax.js b/framework/Web/Javascripts/js/compressed/ajax.js index 4e3bb18d..4b260ab3 100644 --- a/framework/Web/Javascripts/js/compressed/ajax.js +++ b/framework/Web/Javascripts/js/compressed/ajax.js @@ -276,7 +276,7 @@ this.time=setTimeout(this.checkChanges.bind(this),parseInt(this.options.Interval {var request=new Prado.CallbackRequest(this.options.EventTarget,this.options);var param={'OldValue':oldValue,'NewValue':newValue};request.setCallbackParameter(param);request.dispatch();}},{timers:{},register:function(timer) {Prado.WebUI.TValueTriggeredCallback.timers[timer.options.ID]=timer;},stop:function(id) {Prado.WebUI.TValueTriggeredCallback.timers[id].stopObserving();}});Prado.WebUI.TInPlaceTextBox=Base.extend({isSaving:false,isEditing:false,editField:null,constructor:function(options) -{this.options=Object.extend({LoadTextFromSource:false,TextMode:'SingleLine'},options||{});this.element=$(this.options.ID);Prado.WebUI.TInPlaceTextBox.register(this);this.initializeListeners();},initializeListeners:function() +{this.options=Object.extend({LoadTextFromSource:false,TextMode:'SingleLine'},options||{});this.element=$(this.options.ID);Prado.WebUI.TInPlaceTextBox.register(this);this.createEditorInput();this.initializeListeners();},initializeListeners:function() {this.onclickListener=this.enterEditMode.bindAsEventListener(this);Event.observe(this.element,'click',this.onclickListener);if(this.options.ExternalControl) Event.observe($(this.options.ExternalControl),'click',this.onclickListener);},enterEditMode:function(evt) {if(this.isSaving||this.isEditing)return;this.isEditing=true;this.onEnterEditMode();this.createEditorInput();this.showTextBox();this.editField.disabled=false;if(this.options.LoadTextOnEdit) diff --git a/framework/Web/Javascripts/js/debug/ajax.js b/framework/Web/Javascripts/js/debug/ajax.js index 65751d27..d26ad640 100644 --- a/framework/Web/Javascripts/js/debug/ajax.js +++ b/framework/Web/Javascripts/js/debug/ajax.js @@ -2457,6 +2457,7 @@ Prado.WebUI.TInPlaceTextBox = Base.extend( }, options || {}); this.element = $(this.options.ID); Prado.WebUI.TInPlaceTextBox.register(this); + this.createEditorInput(); this.initializeListeners(); }, diff --git a/framework/Web/Javascripts/prado/inlineeditor.js b/framework/Web/Javascripts/prado/inlineeditor.js index de74585f..c73985f7 100644 --- a/framework/Web/Javascripts/prado/inlineeditor.js +++ b/framework/Web/Javascripts/prado/inlineeditor.js @@ -14,6 +14,7 @@ Prado.WebUI.TInPlaceTextBox = Base.extend( }, options || {}); this.element = $(this.options.ID); Prado.WebUI.TInPlaceTextBox.register(this); + this.createEditorInput(); this.initializeListeners(); }, diff --git a/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.page b/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.page new file mode 100644 index 00000000..f4bf644c --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.page @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.php b/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.php new file mode 100644 index 00000000..d31c10f6 --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.php @@ -0,0 +1,53 @@ +loadTurnoOptions(); + + if (!$this->IsPostBack) { + $this->ativaModoEdicao(); + } + } + + + protected function loadTurnoOptions() + { + $this->DDropTurno->DataTextField="descricao"; + $this->DDropTurno->DataValueField="id"; + $this->_turnos = array( + array('id' => 1, 'codigo'=>'test 1', 'descricao' => 'hello 1'), + array('id' => 2, 'codigo'=>'test 2', 'descricao' => 'hello 2') + ); + $this->DDropTurno->setDataSource($this->_turnos); + $this->DDropTurno->dataBind(); + } + + + protected function ativaModoEdicao() { + $this->loadDadosTurno($this->DDropTurno->getSelectedValue()); + } + + + protected function loadDadosTurno($id) { + foreach ($this->_turnos as $key => $tur) { + if ($tur['id'] == $id) { + $this->Codigo->setText($tur['codigo']); + $this->Descricao->setText($tur['descricao']); + } + } + } + + + public function trocaTurno($sender,$param) { + $this->loadDadosTurno($sender->getSelectedValue()); + } + +} + +?> \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/Home.php b/tests/FunctionalTests/active-controls/protected/pages/Home.php new file mode 100644 index 00000000..22b6528a --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/Home.php @@ -0,0 +1,11 @@ +lblTest->Text = "Testing"; + } +} + +?> \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.page b/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.page new file mode 100644 index 00000000..ba3a35db --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.page @@ -0,0 +1,78 @@ + + + + + + +
+ + +
+ + +
+ + +
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.php b/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.php new file mode 100644 index 00000000..e69ffdf2 --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.php @@ -0,0 +1,13 @@ +status->Text = "Status: ". $this->Firstname->Text.".".$this->Lastname->Text; + + } + +} + +?> \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/Master1.php b/tests/FunctionalTests/active-controls/protected/pages/Master1.php new file mode 100644 index 00000000..173a59f0 --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/Master1.php @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/Master1.tpl b/tests/FunctionalTests/active-controls/protected/pages/Master1.tpl new file mode 100644 index 00000000..5e63d57d --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/Master1.tpl @@ -0,0 +1,14 @@ +... + + + + + + + + + + + + +... \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/MasterTest1.page b/tests/FunctionalTests/active-controls/protected/pages/MasterTest1.page new file mode 100644 index 00000000..7f6863cf --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/MasterTest1.page @@ -0,0 +1,14 @@ +<%@ MasterClass="Application.pages.Master1" %> + +men + + + +
+ [color=red][/color] +
+
+ + +ad + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.page b/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.page new file mode 100644 index 00000000..2ce98f5b --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.page @@ -0,0 +1,10 @@ + + +

Null State Test

+ + + + + + +
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.php b/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.php new file mode 100644 index 00000000..0abd8eb5 --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.php @@ -0,0 +1,11 @@ +lblTest->Text = "Testing"; + } +} + +?> \ No newline at end of file diff --git a/tests/simple_unit/SqlMap/common.php b/tests/simple_unit/SqlMap/common.php index 2856f66e..57685c31 100644 --- a/tests/simple_unit/SqlMap/common.php +++ b/tests/simple_unit/SqlMap/common.php @@ -76,7 +76,7 @@ class SQLiteBaseTestConfig extends BaseTestConfig $this->targetFile = realpath(SQLMAP_TESTS.'/sqlite/tests.db'); $this->baseFile = realpath(SQLMAP_TESTS.'/sqlite/backup.db'); $file = realpath($this->targetFile); - $this->_connection = new TDbConnection("sqlite2:{$file}"); + $this->_connection = new TDbConnection("sqlite:{$file}"); } public function getScriptRunner() diff --git a/tests/simple_unit/SqlMap/sqlite/backup.db b/tests/simple_unit/SqlMap/sqlite/backup.db index fa66b2cc..4f5a353d 100644 Binary files a/tests/simple_unit/SqlMap/sqlite/backup.db and b/tests/simple_unit/SqlMap/sqlite/backup.db differ diff --git a/tests/simple_unit/SqlMap/sqlite/tests.db b/tests/simple_unit/SqlMap/sqlite/tests.db index fa66b2cc..290c8899 100644 Binary files a/tests/simple_unit/SqlMap/sqlite/tests.db and b/tests/simple_unit/SqlMap/sqlite/tests.db differ -- cgit v1.2.3