From 40b06f3eff0c5fcc52b5473737f31094536e9bca Mon Sep 17 00:00:00 2001 From: Ciro Mattia Gonano Date: Fri, 13 Sep 2013 10:40:10 +0200 Subject: Update to r3325 --- HISTORY | 4 + bin/apigen.php | 1 - bin/phing | 1 - bin/phpunit | 1 - composer.json | 6 +- framework/I18N/core/data/it_IT.dat | 2 +- framework/PradoBase.php | 8 +- framework/pradolite.php | 6 +- tests/unit/Prado.php | 148 ------------------------------------- tests/unit/phpunit.php | 2 + 10 files changed, 19 insertions(+), 160 deletions(-) delete mode 120000 bin/apigen.php delete mode 120000 bin/phing delete mode 120000 bin/phpunit delete mode 100644 tests/unit/Prado.php diff --git a/HISTORY b/HISTORY index 52395a58..66526085 100644 --- a/HISTORY +++ b/HISTORY @@ -8,6 +8,10 @@ BUG: Issue #465 - Textmate editor plugin template error (ctrlaltca) BUG: Issue #472 - No https support from wsdl generator (Marcin Piotrowski) ENH: Issue #473 - wsdl support for additional attributes of a custom type's property (Marcin Piotrowski) BUG: Issue #476 - Demo's don't work out of box (ctrlaltca) +BUG: Issue #481 - Typo in composer: ext-eaccellerator (ciromattia) +BUG: Issue #482 - composer: add include path for prado.php (ciromattia) +BUG: Issue #484 - Wrong DateTimePatterns for italian culture (ciromattia) +BUG: Issue #485 - NumberFormat fails if LC_ALL locale provides non-english notation (ciromattia, drigolin) BUG: TDatePicker can't render css attributes class "datepicker_year_options" (m_rizki_r) ENH: Added THtmlArea4 based on TinyMCE4 (ctrlaltca) diff --git a/bin/apigen.php b/bin/apigen.php deleted file mode 120000 index 36dafc2a..00000000 --- a/bin/apigen.php +++ /dev/null @@ -1 +0,0 @@ -../vendor/apigen/apigen/apigen.php \ No newline at end of file diff --git a/bin/phing b/bin/phing deleted file mode 120000 index c5270ef2..00000000 --- a/bin/phing +++ /dev/null @@ -1 +0,0 @@ -../vendor/phing/phing/bin/phing \ No newline at end of file diff --git a/bin/phpunit b/bin/phpunit deleted file mode 120000 index 02269f4e..00000000 --- a/bin/phpunit +++ /dev/null @@ -1 +0,0 @@ -../vendor/phpunit/phpunit/composer/bin/phpunit \ No newline at end of file diff --git a/composer.json b/composer.json index 680e4f30..ce883af3 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,6 @@ "role" : "Developer" } ], - "include-path": ["framework"], "require": { "php": ">=5.3.3", "ext-ctype" : "*", @@ -33,6 +32,10 @@ }, "require-dev" : { "phpunit/phpunit" : "3.7.*", + "phpunit/dbunit": ">=1.2", + "phpunit/phpunit-selenium": ">=1.2", + "phpunit/php-invoker": "*", + "phpunit/phpunit-story": "*", "phing/phing" : "2.4.14", "apigen/apigen": "2.*" }, @@ -53,6 +56,7 @@ "ext-xsl" : "*", "ext-zlib" : "*" }, + "include-path": ["framework"], "autoload": { "psr-0" : { "Prado" : "framework", diff --git a/framework/I18N/core/data/it_IT.dat b/framework/I18N/core/data/it_IT.dat index 738a8455..12448d9c 100644 --- a/framework/I18N/core/data/it_IT.dat +++ b/framework/I18N/core/data/it_IT.dat @@ -1 +1 @@ -a:3:{s:10:"Currencies";a:1:{s:3:"ITL";a:3:{i:0;s:3:"₤";i:1;s:13:"Lira Italiana";i:2;a:3:{i:0;s:18:"¤ #,##0;-¤ #,##0";i:1;s:1:",";i:2;s:1:".";}}}s:7:"Version";a:1:{i:0;s:3:"1.2";}s:8:"calendar";a:1:{s:9:"gregorian";a:1:{s:16:"DateTimePatterns";a:9:{i:0;s:10:"HH:mm:ss z";i:1;s:9:"H:mm:ss z";i:2;s:8:"HH:mm:ss";i:3;s:5:"HH:mm";i:4;s:16:"EEEE d MMMM yyyy";i:5;s:12:"dd MMMM yyyy";i:6;s:9:"dd/MMM/yy";i:7;s:10:"dd/MM/yyyy";i:8;s:7:"{1} {0}";}}}} \ No newline at end of file +a:3:{s:10:"Currencies";a:1:{s:3:"ITL";a:3:{i:0;s:3:"₤";i:1;s:13:"Lira Italiana";i:2;a:3:{i:0;s:18:"¤ #,##0;-¤ #,##0";i:1;s:1:",";i:2;s:1:".";}}}s:7:"Version";a:1:{i:0;s:3:"1.2";}s:8:"calendar";a:1:{s:9:"gregorian";a:1:{s:16:"DateTimePatterns";a:9:{i:0;s:10:"HH:mm:ss z";i:1;s:9:"H:mm:ss z";i:2;s:8:"HH:mm:ss";i:3;s:5:"HH:mm";i:4;s:16:"EEEE d MMMM yyyy";i:5;s:12:"dd MMMM yyyy";i:6;s:11:"dd/MMM/yyyy";i:7;s:10:"dd/MM/yyyy";i:8;s:7:"{1} {0}";}}}} \ No newline at end of file diff --git a/framework/PradoBase.php b/framework/PradoBase.php index f75cc680..84826f15 100644 --- a/framework/PradoBase.php +++ b/framework/PradoBase.php @@ -9,7 +9,7 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2013 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: PradoBase.php 3293 2013-07-10 21:33:04Z ctrlaltca $ + * @version $Id: PradoBase.php 3325 2013-09-13 08:19:04Z ctrlaltca $ * @package System */ @@ -34,7 +34,7 @@ if(!defined('PRADO_CHMOD')) * rewritten for customization. * * @author Qiang Xue - * @version $Id: PradoBase.php 3293 2013-07-10 21:33:04Z ctrlaltca $ + * @version $Id: PradoBase.php 3325 2013-09-13 08:19:04Z ctrlaltca $ * @package System * @since 3.0 */ @@ -169,7 +169,7 @@ class PradoBase */ public static function setApplication($application) { - if(self::$_application!==null) + if(self::$_application!==null && !defined('PRADO_TEST_RUN')) throw new TInvalidOperationException('prado_application_singleton_required'); self::$_application=$application; } @@ -381,7 +381,7 @@ class PradoBase */ public static function setPathOfAlias($alias,$path) { - if(isset(self::$_aliases[$alias])) + if(isset(self::$_aliases[$alias]) && !defined('PRADO_TEST_RUN')) throw new TInvalidOperationException('prado_alias_redefined',$alias); else if(($rp=realpath($path))!==false && is_dir($rp)) { diff --git a/framework/pradolite.php b/framework/pradolite.php index f9ea93d3..af40799f 100644 --- a/framework/pradolite.php +++ b/framework/pradolite.php @@ -1,7 +1,7 @@ PRADO_DIR); - private static $_usings=array(); - - public static function setApplication($application) { - self::$_application = $application; - } - - public static function getApplication() { - return self::$_application; - } - - public static function using($namespace,$checkClassExistence=true) - { - if(isset(self::$_usings[$namespace]) || class_exists($namespace,false)) - return; - if(($pos=strrpos($namespace,'.'))===false) // a class name - { - try - { - include_once($namespace.self::CLASS_FILE_EXT); - } - catch(Exception $e) - { - if(!class_exists($namespace,false)) - throw new TInvalidOperationException('prado_component_unknown',$namespace); - else - throw $e; - } - } - else if(($path=self::getPathOfNamespace($namespace,self::CLASS_FILE_EXT))!==null) - { - $className=substr($namespace,$pos+1); - if($className==='*') // a directory - { - self::$_usings[$namespace]=$path; - set_include_path(get_include_path().PATH_SEPARATOR.$path); - } - else // a file - { - self::$_usings[$namespace]=$path; - if(!class_exists($className,false)) - { - try - { - include_once($path); - } - catch(Exception $e) - { - if(!class_exists($className,false)) - throw new TInvalidOperationException('prado_component_unknown',$className); - else - throw $e; - } - } - } - } - else - throw new TInvalidDataValueException('prado_using_invalid',$namespace); - } - - public static function getPathOfNamespace($namespace,$ext='') - { - if(isset(self::$_usings[$namespace])) - return self::$_usings[$namespace]; - else if(isset(self::$_aliases[$namespace])) - return self::$_aliases[$namespace]; - else - { - $segs=explode('.',$namespace); - $alias=array_shift($segs); - if(($file=array_pop($segs))!==null && ($root=self::getPathOfAlias($alias))!==null) - return rtrim($root.'/'.implode('/',$segs),'/').(($file==='*')?'':'/'.$file.$ext); - else - return null; - } - } - - public static function getPathOfAlias($alias) - { - return isset(self::$_aliases[$alias])?self::$_aliases[$alias]:null; - } - - protected static function getPathAliases() - { - return self::$_aliases; - } - - public static function setPathOfAlias($alias, $path) { - if(($rp=realpath($path))!==false && is_dir($rp)) { - if(strpos($alias,'.') === false) - self::$_aliases[$alias] = $rp; - else - throw new TInvalidDataValueException('prado_aliasname_invalid',$alias); - } - else - throw new TInvalidDataValueException('prado_alias_invalid',$alias,$path); - } - - - /*public static function setPathOfAlias($alias, $path) { - if(($rp=realpath($path)) !== false && is_dir($rp)) { - if(strpos($alias,'.') === false) { - self::$_aliases[$alias]=$rp; - } else { - throw new TInvalidDataValueException('prado_aliasname_invalid', $alias); - } - } else { - throw new TInvalidDataValueException('prado_alias_invalid', $alias, $path); - } - }*/ - - - public static function getUserLanguages() - { - $languages=null; - // Recompute $languages each times it's called for unit tests - /*if($languages===null) - {*/ - if(!isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) - $languages[0]='en'; - else - { - $languages=array(); - foreach(explode(',',$_SERVER['HTTP_ACCEPT_LANGUAGE']) as $language) - { - $array=explode(';q=',trim($language)); - $languages[trim($array[0])]=isset($array[1])?(float)$array[1]:1.0; - } - arsort($languages); - $languages=array_keys($languages); - if(empty($languages)) - $languages[0]='en'; - } - /*}*/ - return $languages; - } - -} diff --git a/tests/unit/phpunit.php b/tests/unit/phpunit.php index e32d0e54..5ed6ffb0 100644 --- a/tests/unit/phpunit.php +++ b/tests/unit/phpunit.php @@ -10,6 +10,8 @@ * Also remember do define the @package attribute for your test class to make it appear under * the right package in unit test and code coverage reports. */ + +define('PRADO_TEST_RUN', true); define('PRADO_FRAMEWORK_DIR', dirname(__FILE__).'/../../framework'); set_include_path(PRADO_FRAMEWORK_DIR.PATH_SEPARATOR.get_include_path()); -- cgit v1.2.3