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.

Ticket #856: 856-testapp-pgsql-tests-fail.diff

File 856-testapp-pgsql-tests-fail.diff, 2.2 KB (added by Julien, 12 years ago)

patch for the trunk, will backport it if it's valid

  • testapp/modules/jelix_tests/tests/jdb.pgsql.html_cli.php

     
    1313    protected $dbProfile ='testapp_pgsql';
    1414   
    1515    function testStart() {
     16        try {
     17            $profile = jDb::getProfile($this->dbProfile);
     18        } catch (Exception $e) {
     19            $this->sendMessage('UTjDbPgsql cannot be run: '.$e->getMessage());
     20            return;
     21        }
    1622        $this->emptyTable('product_test');
    1723    }
    1824
     
    2127            $profile = jDb::getProfile($this->dbProfile);
    2228            $tools = jDb::getTools($this->dbProfile);
    2329        } catch (Exception $e) {
    24             $this->sendMessage("UTjDbPgsql cannot be run : no postgresql connexion");
     30            $this->sendMessage('UTjDbPgsql cannot be run: '.$e->getMessage());
    2531            return;
    2632        }
    2733
     
    7278    }
    7379
    7480    function testInsert() {
     81        try {
     82            $profile = jDb::getProfile($this->dbProfile);
     83        } catch (Exception $e) {
     84            $this->sendMessage('UTjDbPgsql cannot be run: '.$e->getMessage());
     85            return;
     86        }
     87       
    7588        $dao = jDao::create ('products', $this->dbProfile);
    7689
    7790        $this->prod1 = jDao::createRecord ('products', $this->dbProfile);
     
    123136    }
    124137
    125138    function testGet() {
     139        try {
     140            $profile = jDb::getProfile($this->dbProfile);
     141        } catch (Exception $e) {
     142            $this->sendMessage('UTjDbPgsql cannot be run: '.$e->getMessage());
     143            return;
     144        }
     145
    126146        $dao = jDao::create ('products', $this->dbProfile);
    127147
    128148        $prod = $dao->get($this->prod1->id);
     
    134154    }
    135155
    136156    function testUpdate(){
     157        try {
     158            $profile = jDb::getProfile($this->dbProfile);
     159        } catch (Exception $e) {
     160            $this->sendMessage('UTjDbPgsql cannot be run: '.$e->getMessage());
     161            return;
     162        }
     163       
    137164        $dao = jDao::create ('products', $this->dbProfile);
    138165        $prod = jDao::createRecord ('products', $this->dbProfile);
    139166        $prod->name ='assiette nouvelle';