Changeset 683

Show
Ignore:
Timestamp:
12/06/07 18:12:20 (1 year ago)
Author:
laurentj
Message:

added unit tests for bug #364

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/testapp/modules/jelix_tests/controllers/urlsig.classic.php

    r468 r683  
    7171      return $this->url1('url10'); 
    7272   } 
     73 
     74   function url30() { 
     75      $rep = $this->getResponse('html',true); 
     76      $content='<h1>test url 30</h1>'; 
     77      $rep->body->assign('MAIN',$content); 
     78      return $rep; 
     79   } 
    7380} 
    7481 
  • trunk/testapp/modules/jelix_tests/controllers/urlsig.classic.php

    r468 r683  
    7171      return $this->url1('url10'); 
    7272   } 
     73 
     74   function url30() { 
     75      $rep = $this->getResponse('html',true); 
     76      $content='<h1>test url 30</h1>'; 
     77      $rep->body->assign('MAIN',$content); 
     78      return $rep; 
     79   } 
    7380} 
    7481 
  • trunk/testapp/modules/jelix_tests/tests/core.urls_generation.html.php

    r513 r683  
    237237      $urlList[]= array('jelix_tests~urlsig_url20', array('mois'=>'08',  'annee'=>'2007','lang'=>'fr_FR')); 
    238238      $urlList[]= array('jelix_tests~urlsig_url20', array('mois'=>'08',  'annee'=>'2007')); 
     239      $urlList[]= array('jelix_tests~urlsig_url30', array()); 
     240      $urlList[]= array('jelix_tests~default_hello2', array()); 
     241      $urlList[]= array('jelix_tests~default_hello3', array()); 
     242      $urlList[]= array('jelix_tests~hello3', array()); 
    239243 
    240244      $trueResult=array( 
     
    256260          "/index.php/articles/fr/2007/08", 
    257261          "/index.php/articles/fr/2007/08", 
     262          "/index.php/hello", 
     263          "/index.php/hello2", 
     264          "/index.php/hello3", 
     265          "/index.php/hello3", 
    258266       ); 
    259267 
     
    281289          "/index/articles/fr/2007/08", 
    282290          "/index/articles/fr/2007/08", 
     291          "/index/hello", 
     292          "/index/hello2", 
     293          "/index/hello3", 
     294          "/index/hello3", 
    283295       ); 
    284296      $trueResult[11]='https://'.$_SERVER['HTTP_HOST'].$trueResult[11]; 
  • trunk/testapp/modules/jelix_tests/tests/core.urls_generation.html.php

    r513 r683  
    237237      $urlList[]= array('jelix_tests~urlsig_url20', array('mois'=>'08',  'annee'=>'2007','lang'=>'fr_FR')); 
    238238      $urlList[]= array('jelix_tests~urlsig_url20', array('mois'=>'08',  'annee'=>'2007')); 
     239      $urlList[]= array('jelix_tests~urlsig_url30', array()); 
     240      $urlList[]= array('jelix_tests~default_hello2', array()); 
     241      $urlList[]= array('jelix_tests~default_hello3', array()); 
     242      $urlList[]= array('jelix_tests~hello3', array()); 
    239243 
    240244      $trueResult=array( 
     
    256260          "/index.php/articles/fr/2007/08", 
    257261          "/index.php/articles/fr/2007/08", 
     262          "/index.php/hello", 
     263          "/index.php/hello2", 
     264          "/index.php/hello3", 
     265          "/index.php/hello3", 
    258266       ); 
    259267 
     
    281289          "/index/articles/fr/2007/08", 
    282290          "/index/articles/fr/2007/08", 
     291          "/index/hello", 
     292          "/index/hello2", 
     293          "/index/hello3", 
     294          "/index/hello3", 
    283295       ); 
    284296      $trueResult[11]='https://'.$_SERVER['HTTP_HOST'].$trueResult[11]; 
  • trunk/testapp/modules/jelix_tests/tests/core.urls_parsing.html.php

    r513 r683  
    7474      $resultList[]= array('module'=>'jelix_tests', 'action'=>'urlsig_url20', 'mois'=>'08',  'annee'=>'2007','lang'=>'en_EN'); 
    7575      $resultList[]= array('module'=>'jelix_tests', 'action'=>'urlsig_url20', 'mois'=>'08',  'annee'=>'2007','lang'=>'fr_FR'); 
     76      $resultList[]= array('module'=>'jelix_tests', 'action'=>'urlsig_url30'); 
     77      $resultList[]= array('module'=>'jelix_tests', 'action'=>'hello2'); 
     78      $resultList[]= array('module'=>'jelix_tests', 'action'=>'default_hello3'); 
    7679 
    7780      $request=array( 
     
    9093          array("index.php","/articles/en/2007/08",array()), 
    9194          array("index.php","/articles/fr/2007/08",array()), 
     95          array("index.php","/hello",array()), 
     96          array("index.php","/hello2",array()), 
     97          array("index.php","/hello3",array()), 
    9298       ); 
    9399 
     
    120126          array("index","/articles/en/2007/08",array()), 
    121127          array("index","/articles/fr/2007/08",array()), 
     128          array("index","/hello",array()), 
     129          array("index","/hello2",array()), 
     130          array("index","/hello3",array()), 
    122131       ); 
    123132      foreach($request as $k=>$urldata){ 
  • trunk/testapp/modules/jelix_tests/tests/core.urls_parsing.html.php

    r513 r683  
    7474      $resultList[]= array('module'=>'jelix_tests', 'action'=>'urlsig_url20', 'mois'=>'08',  'annee'=>'2007','lang'=>'en_EN'); 
    7575      $resultList[]= array('module'=>'jelix_tests', 'action'=>'urlsig_url20', 'mois'=>'08',  'annee'=>'2007','lang'=>'fr_FR'); 
     76      $resultList[]= array('module'=>'jelix_tests', 'action'=>'urlsig_url30'); 
     77      $resultList[]= array('module'=>'jelix_tests', 'action'=>'hello2'); 
     78      $resultList[]= array('module'=>'jelix_tests', 'action'=>'default_hello3'); 
    7679 
    7780      $request=array( 
     
    9093          array("index.php","/articles/en/2007/08",array()), 
    9194          array("index.php","/articles/fr/2007/08",array()), 
     95          array("index.php","/hello",array()), 
     96          array("index.php","/hello2",array()), 
     97          array("index.php","/hello3",array()), 
    9298       ); 
    9399 
     
    120126          array("index","/articles/en/2007/08",array()), 
    121127          array("index","/articles/fr/2007/08",array()), 
     128          array("index","/hello",array()), 
     129          array("index","/hello2",array()), 
     130          array("index","/hello3",array()), 
    122131       ); 
    123132      foreach($request as $k=>$urldata){ 
  • trunk/testapp/var/config/urls.xml

    r498 r683  
    4646              <static name="lang" value="en_EN" /> 
    4747        </url> 
     48        <url pathinfo="/hello" module="jelix_tests" action="urlsig_url30" /> 
     49        <url pathinfo="/hello2" module="jelix_tests" action="hello2" /> 
     50        <url pathinfo="/hello3" module="jelix_tests" action="default_hello3" /> 
    4851    </classicentrypoint> 
    4952    <classicentrypoint name="testnews"> 
  • trunk/testapp/var/config/urls.xml

    r498 r683  
    4646              <static name="lang" value="en_EN" /> 
    4747        </url> 
     48        <url pathinfo="/hello" module="jelix_tests" action="urlsig_url30" /> 
     49        <url pathinfo="/hello2" module="jelix_tests" action="hello2" /> 
     50        <url pathinfo="/hello3" module="jelix_tests" action="default_hello3" /> 
    4851    </classicentrypoint> 
    4952    <classicentrypoint name="testnews"> 
Download in other formats: Unified Diff Zip Archive