Changeset 468
- Timestamp:
- 06/19/07 13:59:11 (2 years ago)
- Files:
-
- trunk/build/manifests/testapp.mn (modified) (2 diffs)
- trunk/build/manifests/testapp.mn (modified) (2 diffs)
- trunk/lib/jelix-modules/junittests/classes/junittestcase.class.php (modified) (1 diff)
- trunk/lib/jelix-modules/junittests/classes/junittestcase.class.php (modified) (1 diff)
- trunk/testapp/modules/jelix_tests (moved) (moved from trunk/testapp/modules/unittest)
- trunk/testapp/modules/jelix_tests (moved) (moved from trunk/testapp/modules/unittest)
- trunk/testapp/modules/jelix_tests/classes/testevents.listener.php (modified) (2 diffs)
- trunk/testapp/modules/jelix_tests/classes/testevents.listener.php (modified) (2 diffs)
- trunk/testapp/modules/jelix_tests/classes/urlsig.urlhandler.php (modified) (1 diff)
- trunk/testapp/modules/jelix_tests/classes/urlsig.urlhandler.php (modified) (1 diff)
- trunk/testapp/modules/jelix_tests/controllers/urlsig.classic.php (modified) (7 diffs)
- trunk/testapp/modules/jelix_tests/controllers/urlsig.classic.php (modified) (7 diffs)
- trunk/testapp/modules/jelix_tests/templates/menu.tpl (modified) (1 diff)
- trunk/testapp/modules/jelix_tests/templates/menu.tpl (modified) (1 diff)
- trunk/testapp/modules/jelix_tests/tests/core.jlocale.html.php (modified) (2 diffs)
- trunk/testapp/modules/jelix_tests/tests/core.jlocale.html.php (modified) (2 diffs)
- trunk/testapp/modules/jelix_tests/tests/core.selectors_action.html.php (modified) (2 diffs)
- trunk/testapp/modules/jelix_tests/tests/core.selectors_action.html.php (modified) (2 diffs)
- trunk/testapp/modules/jelix_tests/tests/core.selectors_module.html.php (modified) (3 diffs)
- trunk/testapp/modules/jelix_tests/tests/core.selectors_module.html.php (modified) (3 diffs)
- trunk/testapp/modules/jelix_tests/tests/core.urls_generation.html.php (modified) (9 diffs)
- trunk/testapp/modules/jelix_tests/tests/core.urls_generation.html.php (modified) (9 diffs)
- trunk/testapp/modules/jelix_tests/tests/core.urls_parsing.html.php (modified) (4 diffs)
- trunk/testapp/modules/jelix_tests/tests/core.urls_parsing.html.php (modified) (4 diffs)
- trunk/testapp/modules/jelix_tests/tests/events.simple_test.html.php (modified) (2 diffs)
- trunk/testapp/modules/jelix_tests/tests/events.simple_test.html.php (modified) (2 diffs)
- trunk/testapp/modules/jelix_tests/tests/jacl.main_api.html.php (modified) (1 diff)
- trunk/testapp/modules/jelix_tests/tests/jacl.main_api.html.php (modified) (1 diff)
- trunk/testapp/modules/jelix_tests/tests/jacl.manager.html.php (modified) (1 diff)
- trunk/testapp/modules/jelix_tests/tests/jacl.manager.html.php (modified) (1 diff)
- trunk/testapp/modules/jelix_tests/tests/jacl.users_and_groups.html.php (modified) (1 diff)
- trunk/testapp/modules/jelix_tests/tests/jacl.users_and_groups.html.php (modified) (1 diff)
- trunk/testapp/modules/jelix_tests/tests/jdao.conditions.html.php (modified) (2 diffs)
- trunk/testapp/modules/jelix_tests/tests/jdao.conditions.html.php (modified) (2 diffs)
- trunk/testapp/modules/jelix_tests/tests/jdao.main_api.html.php (modified) (1 diff)
- trunk/testapp/modules/jelix_tests/tests/jdao.main_api.html.php (modified) (1 diff)
- trunk/testapp/modules/jelix_tests/tests/jdao.main_api_with_pdo.html.php (modified) (1 diff)
- trunk/testapp/modules/jelix_tests/tests/jdao.main_api_with_pdo.html.php (modified) (1 diff)
- trunk/testapp/modules/jelix_tests/tests/jdao.parser.html.php (modified) (3 diffs)
- trunk/testapp/modules/jelix_tests/tests/jdao.parser.html.php (modified) (3 diffs)
- trunk/testapp/modules/jelix_tests/tests/jdao.parser2.html.php (modified) (1 diff)
- trunk/testapp/modules/jelix_tests/tests/jdao.parser2.html.php (modified) (1 diff)
- trunk/testapp/modules/jelix_tests/tests/jdb.0_profiles.html.php (modified) (5 diffs)
- trunk/testapp/modules/jelix_tests/tests/jdb.0_profiles.html.php (modified) (5 diffs)
- trunk/testapp/modules/jelix_tests/tests/jdb.1_queries.html.php (modified) (1 diff)
- trunk/testapp/modules/jelix_tests/tests/jdb.1_queries.html.php (modified) (1 diff)
- trunk/testapp/modules/jelix_tests/tests/jdb.2_queries_with_pdo.html.php (modified) (1 diff)
- trunk/testapp/modules/jelix_tests/tests/jdb.2_queries_with_pdo.html.php (modified) (1 diff)
- trunk/testapp/modules/jelix_tests/tests/jtpl.expressions_parsing.html_cli.php (modified) (2 diffs)
- trunk/testapp/modules/jelix_tests/tests/jtpl.expressions_parsing.html_cli.php (modified) (2 diffs)
- trunk/testapp/modules/jelix_tests/tests/utils.jfilter.html_cli.php (modified) (1 diff)
- trunk/testapp/modules/jelix_tests/tests/utils.jfilter.html_cli.php (modified) (1 diff)
- trunk/testapp/responses/myHtmlResponse.class.php (modified) (1 diff)
- trunk/testapp/responses/myHtmlResponse.class.php (modified) (1 diff)
- trunk/testapp/var/config/dbprofils.ini.php.dist (modified) (3 diffs)
- trunk/testapp/var/config/dbprofils.ini.php.dist (modified) (3 diffs)
- trunk/testapp/var/config/defaultconfig.ini.php.dist (modified) (1 diff)
- trunk/testapp/var/config/defaultconfig.ini.php.dist (modified) (1 diff)
- trunk/testapp/var/config/urls.xml (modified) (4 diffs)
- trunk/testapp/var/config/urls.xml (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/build/manifests/testapp.mn
r465 r468 59 59 sample.form.xml 60 60 61 cd testapp/modules/ unittest61 cd testapp/modules/jelix_tests 62 62 events.xml 63 63 module.xml 64 cd testapp/modules/ unittest/classes64 cd testapp/modules/jelix_tests/classes 65 65 urlsig.urlhandler.php 66 66 testevents.listener.php 67 67 test.iface.php 68 68 myclass.class.php 69 cd testapp/modules/ unittest/classes/tests69 cd testapp/modules/jelix_tests/classes/tests 70 70 foo.class.php 71 71 foo.iface.php 72 cd testapp/modules/ unittest/locales/72 cd testapp/modules/jelix_tests/locales/ 73 73 test_A.properties 74 74 test_B.properties … … 80 80 test_H.properties 81 81 test_I.properties 82 cd testapp/modules/ unittest/locales/fr_FR82 cd testapp/modules/jelix_tests/locales/fr_FR 83 83 testunit.ISO-8859-1.properties 84 cd testapp/modules/ unittest/locales/en_US84 cd testapp/modules/jelix_tests/locales/en_US 85 85 testunit.ISO-8859-1.properties 86 cd testapp/modules/ unittest/templates86 cd testapp/modules/jelix_tests/templates 87 87 menu.tpl 88 cd testapp/modules/ unittest/controllers88 cd testapp/modules/jelix_tests/controllers 89 89 urlsig.classic.php 90 cd testapp/modules/ unittest/daos90 cd testapp/modules/jelix_tests/daos 91 91 products.dao.xml 92 92 93 cd testapp/modules/ unittest/tests/93 cd testapp/modules/jelix_tests/tests/ 94 94 core.jlocale.html.php 95 95 core.selectors_action.html.php trunk/build/manifests/testapp.mn
r465 r468 59 59 sample.form.xml 60 60 61 cd testapp/modules/ unittest61 cd testapp/modules/jelix_tests 62 62 events.xml 63 63 module.xml 64 cd testapp/modules/ unittest/classes64 cd testapp/modules/jelix_tests/classes 65 65 urlsig.urlhandler.php 66 66 testevents.listener.php 67 67 test.iface.php 68 68 myclass.class.php 69 cd testapp/modules/ unittest/classes/tests69 cd testapp/modules/jelix_tests/classes/tests 70 70 foo.class.php 71 71 foo.iface.php 72 cd testapp/modules/ unittest/locales/72 cd testapp/modules/jelix_tests/locales/ 73 73 test_A.properties 74 74 test_B.properties … … 80 80 test_H.properties 81 81 test_I.properties 82 cd testapp/modules/ unittest/locales/fr_FR82 cd testapp/modules/jelix_tests/locales/fr_FR 83 83 testunit.ISO-8859-1.properties 84 cd testapp/modules/ unittest/locales/en_US84 cd testapp/modules/jelix_tests/locales/en_US 85 85 testunit.ISO-8859-1.properties 86 cd testapp/modules/ unittest/templates86 cd testapp/modules/jelix_tests/templates 87 87 menu.tpl 88 cd testapp/modules/ unittest/controllers88 cd testapp/modules/jelix_tests/controllers 89 89 urlsig.classic.php 90 cd testapp/modules/ unittest/daos90 cd testapp/modules/jelix_tests/daos 91 91 products.dao.xml 92 92 93 cd testapp/modules/ unittest/tests/93 cd testapp/modules/jelix_tests/tests/ 94 94 core.jlocale.html.php 95 95 core.selectors_action.html.php trunk/lib/jelix-modules/junittests/classes/junittestcase.class.php
r465 r468 22 22 $this->_reporter->paintCaseStart($this->getLabel()); 23 23 if($this->needPDO){ 24 $this->_reporter->makeDry(!$this->assertTrue(class_exists('PDO',false), 'PDO does not exists ! Test cannot run'));24 $this->_reporter->makeDry(!$this->assertTrue(class_exists('PDO',false), 'PDO does not exists ! You should install PDO because tests need it.')); 25 25 } 26 26 foreach ($this->getTests() as $method) { trunk/lib/jelix-modules/junittests/classes/junittestcase.class.php
r465 r468 22 22 $this->_reporter->paintCaseStart($this->getLabel()); 23 23 if($this->needPDO){ 24 $this->_reporter->makeDry(!$this->assertTrue(class_exists('PDO',false), 'PDO does not exists ! Test cannot run'));24 $this->_reporter->makeDry(!$this->assertTrue(class_exists('PDO',false), 'PDO does not exists ! You should install PDO because tests need it.')); 25 25 } 26 26 foreach ($this->getTests() as $method) { trunk/testapp/modules/jelix_tests/classes/testevents.listener.php
r409 r468 2 2 /** 3 3 * @package testapp 4 * @subpackage unittestmodule4 * @subpackage jelix_tests module 5 5 * @author Jouanneau Laurent 6 6 * @contributor 7 * @copyright 2006 Jouanneau laurent7 * @copyright 2006-2007 Jouanneau laurent 8 8 * @link http://www.jelix.org 9 9 * @licence GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html … … 24 24 */ 25 25 function onTestEvent ($event) { 26 $event->Add(array('module'=>' unittest','ok'=>true));26 $event->Add(array('module'=>'jelix_tests','ok'=>true)); 27 27 } 28 28 trunk/testapp/modules/jelix_tests/classes/testevents.listener.php
r409 r468 2 2 /** 3 3 * @package testapp 4 * @subpackage unittestmodule4 * @subpackage jelix_tests module 5 5 * @author Jouanneau Laurent 6 6 * @contributor 7 * @copyright 2006 Jouanneau laurent7 * @copyright 2006-2007 Jouanneau laurent 8 8 * @link http://www.jelix.org 9 9 * @licence GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html … … 24 24 */ 25 25 function onTestEvent ($event) { 26 $event->Add(array('module'=>' unittest','ok'=>true));26 $event->Add(array('module'=>'jelix_tests','ok'=>true)); 27 27 } 28 28 trunk/testapp/modules/jelix_tests/classes/urlsig.urlhandler.php
r409 r468 2 2 /** 3 3 * @package testapp 4 * @subpackage unittest4 * @subpackage jelix_tests 5 5 * @author Jouanneau Laurent 6 6 * @contributor trunk/testapp/modules/jelix_tests/classes/urlsig.urlhandler.php
r409 r468 2 2 /** 3 3 * @package testapp 4 * @subpackage unittest4 * @subpackage jelix_tests 5 5 * @author Jouanneau Laurent 6 6 * @contributor trunk/testapp/modules/jelix_tests/controllers/urlsig.classic.php
r320 r468 2 2 /** 3 3 * @package testapp 4 * @subpackage unittest module 5 * @version $Id$ 4 * @subpackage jelix_tests module 6 5 * @author Jouanneau Laurent 7 6 * @contributor 8 * @copyright 2006 Jouanneau laurent7 * @copyright 2006-2007 Jouanneau laurent 9 8 * @link http://www.jelix.org 10 9 * @licence GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html … … 15 14 16 15 function url1($type='url1') { 17 $rep = $this->getResponse(' unittest');16 $rep = $this->getResponse('html',true); 18 17 $content='<h1>test url : news '.$type.'</h1>'; 19 18 $content.='<ul><li>annee='.$this->param('annee').'</li>'; … … 24 23 } 25 24 function url2() { 26 $rep = $this->getResponse(' unittest');25 $rep = $this->getResponse('html',true); 27 26 $content='<h1>test url : testnews (url2)</h1>'; 28 27 $content.='<ul><li>annee='.$this->param('annee').'</li>'; … … 33 32 } 34 33 function url3() { 35 $rep = $this->getResponse(' unittest');34 $rep = $this->getResponse('html',true); 36 35 $content='<h1>test url : cms (url3)</h1>'; 37 36 $content.='<ul><li>rubrique='.$this->param('rubrique').'</li>'; … … 42 41 } 43 42 function url4() { 44 $rep = $this->getResponse(' unittest');43 $rep = $this->getResponse('html',true); 45 44 $content='<h1>test url handler (url4)</h1>'; 46 45 $content.='<ul><li>first='.$this->param('first').'</li>'; … … 50 49 } 51 50 function url5() { 52 return $this->getResponse(' unittest');51 return $this->getResponse('html',true); 53 52 } 54 53 function url6() { 55 $rep = $this->getResponse(' testunit');54 $rep = $this->getResponse('html',true); 56 55 $content='<h1>test url : cms2 (url6)</h1>'; 57 56 $content.='<ul><li>rubrique='.$this->param('rubrique').'</li>'; … … 61 60 } 62 61 function url7() { 63 return $this->getResponse(' unittest');62 return $this->getResponse('html',true); 64 63 } 65 64 function url8() { trunk/testapp/modules/jelix_tests/controllers/urlsig.classic.php
r320 r468 2 2 /** 3 3 * @package testapp 4 * @subpackage unittest module 5 * @version $Id$ 4 * @subpackage jelix_tests module 6 5 * @author Jouanneau Laurent 7 6 * @contributor 8 * @copyright 2006 Jouanneau laurent7 * @copyright 2006-2007 Jouanneau laurent 9 8 * @link http://www.jelix.org 10 9 * @licence GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html … … 15 14 16 15 function url1($type='url1') { 17 $rep = $this->getResponse(' unittest');16 $rep = $this->getResponse('html',true); 18 17 $content='<h1>test url : news '.$type.'</h1>'; 19 18 $content.='<ul><li>annee='.$this->param('annee').'</li>'; … … 24 23 } 25 24 function url2() { 26 $rep = $this->getResponse(' unittest');25 $rep = $this->getResponse('html',true); 27 26 $content='<h1>test url : testnews (url2)</h1>'; 28 27 $content.='<ul><li>annee='.$this->param('annee').'</li>'; … … 33 32 } 34 33 function url3() { 35 $rep = $this->getResponse(' unittest');34 $rep = $this->getResponse('html',true); 36 35 $content='<h1>test url : cms (url3)</h1>'; 37 36 $content.='<ul><li>rubrique='.$this->param('rubrique').'</li>'; … … 42 41 } 43 42 function url4() { 44 $rep = $this->getResponse(' unittest');43 $rep = $this->getResponse('html',true); 45 44 $content='<h1>test url handler (url4)</h1>'; 46 45 $content.='<ul><li>first='.$this->param('first').'</li>'; … … 50 49 } 51 50 function url5() { 52 return $this->getResponse(' unittest');51 return $this->getResponse('html',true); 53 52 } 54 53 function url6() { 55 $rep = $this->getResponse(' testunit');54 $rep = $this->getResponse('html',true); 56 55 $content='<h1>test url : cms2 (url6)</h1>'; 57 56 $content.='<ul><li>rubrique='.$this->param('rubrique').'</li>'; … … 61 60 } 62 61 function url7() { 63 return $this->getResponse(' unittest');62 return $this->getResponse('html',true); 64 63 } 65 64 function url8() { trunk/testapp/modules/jelix_tests/templates/menu.tpl
r465 r468 5 5 6 6 <li>test urls : 7 <a href="{jurl ' unittest~urlsig_url1',array('annee'=>'2006','mois'=>'10','id'=>'01')}">url1</a>8 <a href="{jurl ' unittest~urlsig_url9',array('annee'=>'2006','mois'=>'10','id'=>'09')}">url9</a>9 <a href="{jurl ' unittest~urlsig_url10',array('annee'=>'2006','mois'=>'10','id'=>'10')}">url10</a>10 <a href="{jurl ' unittest~urlsig_url3',array('rubrique'=>'voiture','id_art'=>'54','article'=>'dodge viper')}">url3</a>11 <a href="{jurl ' unittest~urlsig_url2',array('annee'=>'2005','mois'=>'7')}">url2</a>12 <a href="{jurl ' unittest~urlsig_url4',array('first'=>'premier parametre','second'=>'toto le rigolo')}">url4</a>7 <a href="{jurl 'jelix_tests~urlsig_url1',array('annee'=>'2006','mois'=>'10','id'=>'01')}">url1</a> 8 <a href="{jurl 'jelix_tests~urlsig_url9',array('annee'=>'2006','mois'=>'10','id'=>'09')}">url9</a> 9 <a href="{jurl 'jelix_tests~urlsig_url10',array('annee'=>'2006','mois'=>'10','id'=>'10')}">url10</a> 10 <a href="{jurl 'jelix_tests~urlsig_url3',array('rubrique'=>'voiture','id_art'=>'54','article'=>'dodge viper')}">url3</a> 11 <a href="{jurl 'jelix_tests~urlsig_url2',array('annee'=>'2005','mois'=>'7')}">url2</a> 12 <a href="{jurl 'jelix_tests~urlsig_url4',array('first'=>'premier parametre','second'=>'toto le rigolo')}">url4</a> 13 13 </li> 14 14 </ul> trunk/testapp/modules/jelix_tests/templates/menu.tpl
r465 r468 5 5 6 6 <li>test urls : 7 <a href="{jurl ' unittest~urlsig_url1',array('annee'=>'2006','mois'=>'10','id'=>'01')}">url1</a>8 <a href="{jurl ' unittest~urlsig_url9',array('annee'=>'2006','mois'=>'10','id'=>'09')}">url9</a>9 <a href="{jurl ' unittest~urlsig_url10',array('annee'=>'2006','mois'=>'10','id'=>'10')}">url10</a>10 <a href="{jurl ' unittest~urlsig_url3',array('rubrique'=>'voiture','id_art'=>'54','article'=>'dodge viper')}">url3</a>11 <a href="{jurl ' unittest~urlsig_url2',array('annee'=>'2005','mois'=>'7')}">url2</a>12 <a href="{jurl ' unittest~urlsig_url4',array('first'=>'premier parametre','second'=>'toto le rigolo')}">url4</a>7 <a href="{jurl 'jelix_tests~urlsig_url1',array('annee'=>'2006','mois'=>'10','id'=>'01')}">url1</a> 8 <a href="{jurl 'jelix_tests~urlsig_url9',array('annee'=>'2006','mois'=>'10','id'=>'09')}">url9</a> 9 <a href="{jurl 'jelix_tests~urlsig_url10',array('annee'=>'2006','mois'=>'10','id'=>'10')}">url10</a> 10 <a href="{jurl 'jelix_tests~urlsig_url3',array('rubrique'=>'voiture','id_art'=>'54','article'=>'dodge viper')}">url3</a> 11 <a href="{jurl 'jelix_tests~urlsig_url2',array('annee'=>'2005','mois'=>'7')}">url2</a> 12 <a href="{jurl 'jelix_tests~urlsig_url4',array('first'=>'premier parametre','second'=>'toto le rigolo')}">url4</a> 13 13 </li> 14 14 </ul> trunk/testapp/modules/jelix_tests/tests/core.jlocale.html.php
r464 r468 2 2 /** 3 3 * @package testapp 4 * @subpackage unittestmodule4 * @subpackage jelix_tests module 5 5 * @author Jouanneau Laurent 6 6 * @contributor … … 28 28 29 29 public function testBundleUnknowFile(){ 30 $this->filePath = JELIX_APP_PATH.'modules/ unittest/locales/';30 $this->filePath = JELIX_APP_PATH.'modules/jelix_tests/locales/'; 31 31 $b = new bundleTest('',''); 32 32 try { trunk/testapp/modules/jelix_tests/tests/core.jlocale.html.php
r464 r468 2 2 /** 3 3 * @package testapp 4 * @subpackage unittestmodule4 * @subpackage jelix_tests module 5 5 * @author Jouanneau Laurent 6 6 * @contributor … … 28 28 29 29 public function testBundleUnknowFile(){ 30 $this->filePath = JELIX_APP_PATH.'modules/ unittest/locales/';30 $this->filePath = JELIX_APP_PATH.'modules/jelix_tests/locales/'; 31 31 $b = new bundleTest('',''); 32 32 try { trunk/testapp/modules/jelix_tests/tests/core.selectors_action.html.php
r464 r468 2 2 /** 3 3 * @package testapp 4 * @subpackage unittestmodule4 * @subpackage jelix_tests module 5 5 * @author Jouanneau Laurent 6 6 * @contributor … … 85 85 function testMisc() { 86 86 $sels=array( 87 "ctrl_meth@truc"=>array(' unittest','ctrl','meth','truc'),88 "_meth@truc"=>array(' unittest','default','meth','truc'),89 "ctrl_@truc"=>array(' unittest','ctrl','index','truc'),90 "@truc"=>array(' unittest','default','index','truc'),91 "#@truc"=>array(' unittest',$GLOBALS['gJCoord']->action->controller, $GLOBALS['gJCoord']->action->method,'truc'),92 "ctrl_meth"=>array(' unittest','ctrl','meth','classic'),93 "_meth"=>array(' unittest','default','meth','classic'),94 "meth"=>array(' unittest','default','meth','classic'),95 "ctrl_"=>array(' unittest','ctrl','index','classic'),96 ""=>array(' unittest','default','index','classic'),97 "#"=>array(' unittest',$GLOBALS['gJCoord']->action->controller, $GLOBALS['gJCoord']->action->method,'classic'),87 "ctrl_meth@truc"=>array('jelix_tests','ctrl','meth','truc'), 88 "_meth@truc"=>array('jelix_tests','default','meth','truc'), 89 "ctrl_@truc"=>array('jelix_tests','ctrl','index','truc'), 90 "@truc"=>array('jelix_tests','default','index','truc'), 91 "#@truc"=>array('jelix_tests',$GLOBALS['gJCoord']->action->controller, $GLOBALS['gJCoord']->action->method,'truc'), 92 "ctrl_meth"=>array('jelix_tests','ctrl','meth','classic'), 93 "_meth"=>array('jelix_tests','default','meth','classic'), 94 "meth"=>array('jelix_tests','default','meth','classic'), 95 "ctrl_"=>array('jelix_tests','ctrl','index','classic'), 96 ""=>array('jelix_tests','default','index','classic'), 97 "#"=>array('jelix_tests',$GLOBALS['gJCoord']->action->controller, $GLOBALS['gJCoord']->action->method,'classic'), 98 98 ); 99 99 $this->runtest($sels); trunk/testapp/modules/jelix_tests/tests/core.selectors_action.html.php
r464 r468 2 2 /** 3 3 * @package testapp 4 * @subpackage unittestmodule4 * @subpackage jelix_tests module 5 5 * @author Jouanneau Laurent 6 6 * @contributor … … 85 85 function testMisc() { 86 86 $sels=array( 87 "ctrl_meth@truc"=>array(' unittest','ctrl','meth','truc'),88 "_meth@truc"=>array(' unittest','default','meth','truc'),89 "ctrl_@truc"=>array(' unittest','ctrl','index','truc'),90 "@truc"=>array(' unittest','default','index','truc'),91 "#@truc"=>array(' unittest',$GLOBALS['gJCoord']->action->controller, $GLOBALS['gJCoord']->action->method,'truc'),92 "ctrl_meth"=>array(' unittest','ctrl','meth','classic'),93 "_meth"=>array(' unittest','default','meth','classic'),94 "meth"=>array(' unittest','default','meth','classic'),95 "ctrl_"=>array(' unittest','ctrl','index','classic'),96 ""=>array(' unittest','default','index','classic'),97 "#"=>array(' unittest',$GLOBALS['gJCoord']->action->controller, $GLOBALS['gJCoord']->action->method,'classic'),87 "ctrl_meth@truc"=>array('jelix_tests','ctrl','meth','truc'), 88 "_meth@truc"=>array('jelix_tests','default','meth','truc'), 89 "ctrl_@truc"=>array('jelix_tests','ctrl','index','truc'), 90 "@truc"=>array('jelix_tests','default','index','truc'), 91 "#@truc"=>array('jelix_tests',$GLOBALS['gJCoord']->action->controller, $GLOBALS['gJCoord']->action->method,'truc'), 92 "ctrl_meth"=>array('jelix_tests','ctrl','meth','classic'), 93 "_meth"=>array('jelix_tests','default','meth','classic'), 94 "meth"=>array('jelix_tests','default','meth','classic'), 95 "ctrl_"=>array('jelix_tests','ctrl','index','classic'), 96 ""=>array('jelix_tests','default','index','classic'), 97 "#"=>array('jelix_tests',$GLOBALS['gJCoord']->action->controller, $GLOBALS['gJCoord']->action->method,'classic'), 98 98 ); 99 99 $this->runtest($sels); trunk/testapp/modules/jelix_tests/tests/core.selectors_module.html.php
r465 r468 2 2 /** 3 3 * @package jelix 4 * @subpackage unittestmodule4 * @subpackage jelix_tests module 5 5 * @author Jouanneau Laurent 6 6 * @contributor … … 32 32 function testClassSelector() { 33 33 $sels=array( 34 "myclass"=>array(' unittest','myclass', '', 'myclass'),35 " unittest~myclass"=>array('unittest','myclass', '', 'myclass'),36 " unittest~tests/foo"=>array('unittest','tests/foo', 'tests/', 'foo'),34 "myclass"=>array('jelix_tests','myclass', '', 'myclass'), 35 "jelix_tests~myclass"=>array('jelix_tests','myclass', '', 'myclass'), 36 "jelix_tests~tests/foo"=>array('jelix_tests','tests/foo', 'tests/', 'foo'), 37 37 ); 38 38 … … 89 89 function testInterfaceSelector() { 90 90 $sels=array( 91 "test"=>array(' unittest','test', '', 'test'),92 " unittest~test"=>array('unittest','test', '', 'test'),93 " unittest~tests/foo"=>array('unittest','tests/foo', 'tests/', 'foo'),91 "test"=>array('jelix_tests','test', '', 'test'), 92 "jelix_tests~test"=>array('jelix_tests','test', '', 'test'), 93 "jelix_tests~tests/foo"=>array('jelix_tests','tests/foo', 'tests/', 'foo'), 94 94 ); 95 95 trunk/testapp/modules/jelix_tests/tests/core.selectors_module.html.php
r465 r468 2 2 /** 3 3 * @package jelix 4 * @subpackage unittestmodule4 * @subpackage jelix_tests module 5 5 * @author Jouanneau Laurent 6 6 * @contributor … … 32 32 function testClassSelector() { 33 33 $sels=array( 34 "myclass"=>array(' unittest','myclass', '', 'myclass'),35 " unittest~myclass"=>array('unittest','myclass', '', 'myclass'),36 " unittest~tests/foo"=>array('unittest','tests/foo', 'tests/', 'foo'),34 "myclass"=>array('jelix_tests','myclass', '', 'myclass'), 35 "jelix_tests~myclass"=>array('jelix_tests','myclass', '', 'myclass'), 36 "jelix_tests~tests/foo"=>array('jelix_tests','tests/foo', 'tests/', 'foo'), 37 37 ); 38 38 … … 89 89 function testInterfaceSelector() { 90 90 $sels=array( 91 "test"=>array(' unittest','test', '', 'test'),92 " unittest~test"=>array('unittest','test', '', 'test'),93 " unittest~tests/foo"=>array('unittest','tests/foo', 'tests/', 'foo'),91 "test"=>array('jelix_tests','test', '', 'test'), 92 "jelix_tests~test"=>array('jelix_tests','test', '', 'test'), 93 "jelix_tests~tests/foo"=>array('jelix_tests','tests/foo', 'tests/', 'foo'), 94 94 ); 95 95 trunk/testapp/modules/jelix_tests/tests/core.urls_generation.html.php
r464 r468 2 2 /** 3 3 * @package testapp 4 * @subpackage unittestmodule4 * @subpackage jelix_tests module 5 5 * @author Jouanneau Laurent 6 6 * @contributor … … 49 49 $this->assertTrue( ($url == $trueResult[$k]), 'url attendue='.$trueResult[$k].' url créée='.$url ); 50 50 }catch(jExceptionSelector $e){ 51 $this->assertTrue(false,'jExceptionSelector: '.$e->getMessage().' ('.$e->getLocal Key().')');51 $this->assertTrue(false,'jExceptionSelector: '.$e->getMessage().' ('.$e->getLocaleKey().')'); 52 52 }catch(jException $e){ 53 $this->assertTrue(false,'jException: '.$e->getMessage().' ('.$e->getLocal Key().')');53 $this->assertTrue(false,'jException: '.$e->getMessage().' ('.$e->getLocaleKey().')'); 54 54 }catch(Exception $e){ 55 55 $msgerr = '<br>Survenue : exception=Exception code='.$e->getCode().' msg='.$e->getMessage(); … … 100 100 'entrypointExtension'=>'.php', 101 101 'notfoundAct'=>'jelix~notfound', 102 'simple_urlengine_https'=>' unittest~urlsig_url8@classic @xmlrpc',102 'simple_urlengine_https'=>'jelix_tests~urlsig_url8@classic @xmlrpc', 103 103 ); 104 104 /* $gJConfig->simple_urlengine_entrypoints = array( 105 105 'index' => "@classic", 106 'testnews'=>" unittest~url2@classic",107 'foo/bar'=>" unittest~url4@classic",106 'testnews'=>"jelix_tests~url2@classic", 107 'foo/bar'=>"jelix_tests~url4@classic", 108 108 'xmlrpc' => "@xmlrpc", 109 109 'jsonrpc' => "@jsonrpc" … … 114 114 $urlList[]= array('urlsig_url1', array('mois'=>'10', 'annee'=>'2005', 'id'=>'35')); 115 115 $urlList[]= array('urlsig_url2', array('mois'=>'05', 'annee'=>'2004')); 116 $urlList[]= array(' unittest~urlsig_url3', array('rubrique'=>'actualite', 'id_art'=>'65', 'article'=>'c\'est la fête au village'));117 $urlList[]= array(' unittest~urlsig_url4', array('first'=>'premier', 'second'=>'deuxieme'));116 $urlList[]= array('jelix_tests~urlsig_url3', array('rubrique'=>'actualite', 'id_art'=>'65', 'article'=>'c\'est la fête au village')); 117 $urlList[]= array('jelix_tests~urlsig_url4', array('first'=>'premier', 'second'=>'deuxieme')); 118 118 // celle ci n'a pas de définition dans urls.xml *exprés* 119 119 $urlList[]= array('urlsig_url5', array('foo'=>'oof', 'bar'=>'rab')); 120 120 $urlList[]= array('jelix~bar@xmlrpc', array('aaa'=>'bbb')); 121 $urlList[]= array(' unittest~urlsig_url8', array('rubrique'=>'vetements', 'id_article'=>'98'));122 123 $trueResult=array( 124 "/index.php?mois=10&annee=2005&id=35&module= unittest&action=urlsig_url1",125 "/testnews.php?mois=05&annee=2004&module= unittest&action=urlsig_url2",126 "/testnews.php?rubrique=actualite&id_art=65&article=c%27est+la+f%C3%AAte+au+village&module= unittest&action=urlsig_url3",127 "/foo/bar.php?first=premier&second=deuxieme&module= unittest&action=urlsig_url4",128 "/index.php?foo=oof&bar=rab&module= unittest&action=urlsig_url5",121 $urlList[]= array('jelix_tests~urlsig_url8', array('rubrique'=>'vetements', 'id_article'=>'98')); 122 123 $trueResult=array( 124 "/index.php?mois=10&annee=2005&id=35&module=jelix_tests&action=urlsig_url1", 125 "/testnews.php?mois=05&annee=2004&module=jelix_tests&action=urlsig_url2", 126 "/testnews.php?rubrique=actualite&id_art=65&article=c%27est+la+f%C3%AAte+au+village&module=jelix_tests&action=urlsig_url3", 127 "/foo/bar.php?first=premier&second=deuxieme&module=jelix_tests&action=urlsig_url4", 128 "/index.php?foo=oof&bar=rab&module=jelix_tests&action=urlsig_url5", 129 129 "/xmlrpc.php", 130 "/index.php?rubrique=vetements&id_article=98&module= unittest&action=urlsig_url8",130 "/index.php?rubrique=vetements&id_article=98&module=jelix_tests&action=urlsig_url8", 131 131 ); 132 132 … … 139 139 jUrl::getEngine(true); // on recharge le nouveau moteur d'url 140 140 $trueResult=array( 141 "/index?mois=10&annee=2005&id=35&module= unittest&action=urlsig_url1",142 "/testnews?mois=05&annee=2004&module= unittest&action=urlsig_url2",143 "/testnews?rubrique=actualite&id_art=65&article=c%27est+la+f%C3%AAte+au+village&module= unittest&action=urlsig_url3",144 "/foo/bar?first=premier&second=deuxieme&module= unittest&action=urlsig_url4",145 "/index?foo=oof&bar=rab&module= unittest&action=urlsig_url5",141 "/index?mois=10&annee=2005&id=35&module=jelix_tests&action=urlsig_url1", 142 "/testnews?mois=05&annee=2004&module=jelix_tests&action=urlsig_url2", 143 "/testnews?rubrique=actualite&id_art=65&article=c%27est+la+f%C3%AAte+au+village&module=jelix_tests&action=urlsig_url3", 144 "/foo/bar?first=premier&second=deuxieme&module=jelix_tests&action=urlsig_url4", 145 "/index?foo=oof&bar=rab&module=jelix_tests&action=urlsig_url5", 146 146 "/xmlrpc", 147 "/index?rubrique=vetements&id_article=98&module= unittest&action=urlsig_url8",147 "/index?rubrique=vetements&id_article=98&module=jelix_tests&action=urlsig_url8", 148 148 ); 149 149 $trueResult[5]='https://'.$_SERVER['HTTP_HOST'].$trueResult[5]; … … 169 169 'entrypointExtension'=>'.php', 170 170 'notfoundAct'=>'jelix~notfound', 171 'simple_urlengine_https'=>' unittest~urlsig_url8@classic @xmlrpc',171 'simple_urlengine_https'=>'jelix_tests~urlsig_url8@classic @xmlrpc', 172 172 ); 173 173 … … 222 222 $urlList[]= array('urlsig_url10', array('mois'=>'10', 'annee'=>'2005', 'id'=>'10')); 223 223 $urlList[]= array('urlsig_url2', array('mois'=>'05', 'annee'=>'2004')); 224 $urlList[]= array(' unittest~urlsig_url3', array('rubrique'=>'actualite', 'id_art'=>'65', 'article'=>'c\'est la fête au village'));225 $urlList[]= array(' unittest~urlsig_url6', array('rubrique'=>'actualite', 'id_art'=>'65'));226 $urlList[]= array(' unittest~urlsig_url4', array('first'=>'premier', 'second'=>'deuxieme'));224 $urlList[]= array('jelix_tests~urlsig_url3', array('rubrique'=>'actualite', 'id_art'=>'65', 'article'=>'c\'est la fête au village')); 225 $urlList[]= array('jelix_tests~urlsig_url6', array('rubrique'=>'actualite', 'id_art'=>'65')); 226 $urlList[]= array('jelix_tests~urlsig_url4', array('first'=>'premier', 'second'=>'deuxieme')); 227 227 // celle ci n'a pas de définition dans urls.xml *exprés* 228 228 $urlList[]= array('urlsig_url5', array('foo'=>'oof', 'bar'=>'rab')); 229 229 $urlList[]= array('jelix~bar@xmlrpc', array('aaa'=>'bbb')); 230 230 $urlList[]= array('news~bar', array('aaa'=>'bbb')); 231 $urlList[]= array(' unittest~urlsig_url8', array('mois'=>'23', 'annee'=>'2007', 'id'=>'74'));232 $urlList[]= array(' unittest~urlsig_url11', array('rubrique'=>'vetements', 'id_article'=>'98'));233 $urlList[]= array(' unittest~urlsig_url12', array('rubrique'=>'bricolage', 'id_article'=>'53'));234 $urlList[]= array(' unittest~urlsig_url13', array('rubrique'=>'alimentation', 'id_article'=>'26'));231 $urlList[]= array('jelix_tests~urlsig_url8', array('mois'=>'23', 'annee'=>'2007', 'id'=>'74')); 232 $urlList[]= array('jelix_tests~urlsig_url11', array('rubrique'=>'vetements', 'id_article'=>'98')); 233 $urlList[]= array('jelix_tests~urlsig_url12', array('rubrique'=>'bricolage', 'id_article'=>'53')); 234 $urlList[]= array('jelix_tests~urlsig_url13', array('rubrique'=>'alimentation', 'id_article'=>'26')); 235 235 236 236 $trueResult=array( … … 242 242 "/test/cms2/actualite/65", 243 243 "/foo/bar.php/withhandler/premier/deuxieme", 244 "/index.php?foo=oof&bar=rab&module= unittest&action=urlsig_url5",244 "/index.php?foo=oof&bar=rab&module=jelix_tests&action=urlsig_url5", 245 245 "/xmlrpc.php", 246 246 "/news.php?aaa=bbb&action=default_bar", … … 264 264 "/test/cms2/actualite/65", 265 265 "/foo/bar/withhandler/premier/deuxieme", 266 "/index?foo=oof&bar=rab&module= unittest&action=urlsig_url5",266 "/index?foo=oof&bar=rab&module=jelix_tests&action=urlsig_url5", 267 267 "/xmlrpc", 268 268 "/news?aaa=bbb&action=default_bar", trunk/testapp/modules/jelix_tests/tests/core.urls_generation.html.php
r464 r468 2 2 /** 3 3 * @package testapp 4 * @subpackage unittestmodule4 * @subpackage jelix_tests module 5 5 * @author Jouanneau Laurent 6 6 * @contributor … … 49 49 $this->assertTrue( ($url == $trueResult[$k]), 'url attendue='.$trueResult[$k].' url créée='.$url ); 50 50 }catch(jExceptionSelector $e){ 51 $this->assertTrue(false,'jExceptionSelector: '.$e->getMessage().' ('.$e->getLocal Key().')');51 $this->assertTrue(false,'jExceptionSelector: '.$e->getMessage().' ('.$e->getLocaleKey().')'); 52 52 }catch(jException $e){ 53 $this->assertTrue(false,'jException: '.$e->getMessage().' ('.$e->getLocal Key().')');53 $this->assertTrue(false,'jException: '.$e->getMessage().' ('.$e->getLocaleKey().')'); 54 54 }catch(Exception $e){ 55 55 $msgerr = '<br>Survenue : exception=Exception code='.$e->getCode().' msg='.$e->getMessage(); … … 100 100 'entrypointExtension'=>'.php', 101 101 'notfoundAct'=>'jelix~notfound', 102 'simple_urlengine_https'=>' unittest~urlsig_url8@classic @xmlrpc',102 'simple_urlengine_https'=>'jelix_tests~urlsig_url8@classic @xmlrpc', 103 103 ); 104 104 /* $gJConfig->simple_urlengine_entrypoints = array( 105 105 'index' => "@classic", 106 'testnews'=>" unittest~url2@classic",107 'foo/bar'=>" unittest~url4@classic",106 'testnews'=>"jelix_tests~url2@classic", 107 'foo/bar'=>"jelix_tests~url4@classic", 108 108 'xmlrpc' => "@xmlrpc", 109 109 'jsonrpc' => "@jsonrpc" … … 114 114 $urlList[]= array('urlsig_url1', array('mois'=>'10', 'annee'=>'2005', 'id'=>'35')); 115 115 $urlList[]= array('urlsig_url2', array('mois'=>'
