developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Opened 12 years ago

Closed 12 years ago

#421 closed bug (fixed)

Bug junittests lié au context

Reported by: rahal Owned by: laurentj
Priority: normal Milestone: Jelix 1.0.1
Component: module:junittests Version: 1.0
Severity: minor Keywords: tests
Cc: Blocked By:
Blocking: Documentation needed:
Hosting Provider: Php version:

Description

L'execution des tests donne des fois des erreurs critiques, surtout quand on test des composants utilisant les contextes : Le test suivant en fait partie

class testZone extends jUnitTestCase{

	function testCreationZone() {
		$zone = new jZone();
		$this->assertTrue(is_object($zone),"Pas d'objet");
		
		
	}
	function testGetZone(){
		$zone = new jZone();
		$this->assertTrue(is_object($zone),"Pas d'objet");
		$retour = $zone->get('unezone');
		$this->assertTrue(is_string($retour), "No string return");
	}
	function testGetZoneAvecParametre(){
		$zone = new jZone();
		$this->assertTrue(is_object($zone),"Pas d'objet zone");
		$retour = $zone->get('unezone' ,  array ('parametre' => 'parametre'));
		$this->assertTrue(is_string($retour), "No string return");
	}
	
	
}

Pour corriger l'execution du test , j'ai forcé le module au niveau du template dans le controlleur principal de junittests


    protected function _prepareResponse(){
        $rep = $this->getResponse('html', true);
        $rep->bodyTpl = 'junittests~main';

        $rep->body->assign('page_title', 'Unit Tests');
       ...

Change History (2)

comment:1 Changed 12 years ago by laurentj

  • Component changed from modules to module: junittests
  • Milestone set to Jelix 1.0.1
  • Owner set to laurentj
  • Severity changed from normal to minor
  • Status changed from new to assigned

comment:2 Changed 12 years ago by laurentj

  • Resolution set to fixed
  • Status changed from assigned to closed

fixed in the trunk and 1.0.x branch

Note: See TracTickets for help on using tickets.