Typo , adapt unit-test
This commit is contained in:
parent
03dcc7e0e0
commit
8e353e9072
4 changed files with 8 additions and 6 deletions
|
|
@ -113,7 +113,7 @@ if ( $action == "info" && SYSINFO_DISPLAY == true) {
|
|||
echo "<li>". "NOALYSS_HOME".": ".NOALYSS_HOME."</li>";
|
||||
echo "<li>"."NOALYSS_INCLUDE".": ".NOALYSS_INCLUDE."</li>";
|
||||
echo "<li>"."NOALYSS_TEMPLATE".": ".NOALYSS_TEMPLATE."</li>";
|
||||
echo "<li>"."DEBUG".": ".DEBUG."</li>";
|
||||
echo "<li>"."DEBUG".": ".DEBUGNOALYSS."</li>";
|
||||
echo "<li>"."LOGINPUT".": ".LOGINPUT."</li>";
|
||||
echo "<li>"."LOCALE".": ".LOCALE."</li>";
|
||||
echo "<li>"."MULTI".": ".MULTI."</li>";
|
||||
|
|
|
|||
|
|
@ -57,8 +57,8 @@ class Anc_Account_Table extends Manage_Table_SQL
|
|||
pa_id=$1
|
||||
order by 2",0,array($p_table->pa_id));
|
||||
$this->set_col_type("po_state","select",array(
|
||||
[ "value"=>"0",'label'=>_("Inactif")],
|
||||
[ "value"=>"1","label"=>_("Actif")]
|
||||
[ "value"=>"1","label"=>_("Actif")],
|
||||
[ "value"=>"0",'label'=>_("Inactif")]
|
||||
));
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ class DatabaseCore
|
|||
|
||||
function __construct($p_user, $p_password, $p_dbname, $p_host, $p_port)
|
||||
{
|
||||
$this->db = pg_connect("dbname=$p_dbname host='$p_host' user='$p_user'
|
||||
$this->db = @pg_connect("dbname=$p_dbname host='$p_host' user='$p_user'
|
||||
password='$p_password' port=$p_port");
|
||||
if ($this->db == false) {
|
||||
if ( DEBUGNOALYSS > 0 ) {
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ VALUES(1, 'ACTIVITE', 'Activité commerciale Alchimerys sprl');
|
|||
$this->object->set("po_name", "Nouveau poste");
|
||||
$this->object->set("pa_id", "1");
|
||||
$this->object->set("po_amount", "0");
|
||||
$this->object->set("po_state", "1");
|
||||
$this->object->save();
|
||||
$id=$this->object->get("po_id");
|
||||
$this->assertFalse(empty($id));
|
||||
|
|
@ -133,6 +134,7 @@ VALUES(1, 'ACTIVITE', 'Activité commerciale Alchimerys sprl');
|
|||
$this->object->set("po_name", "Nouveau poste");
|
||||
$this->object->set("pa_id", "1");
|
||||
$this->object->set("po_amount", "1250");
|
||||
$this->object->set("po_state", "1");
|
||||
$this->object->save();
|
||||
$id=$this->object->get("po_id");
|
||||
$this->assertFalse(empty($id));
|
||||
|
|
@ -206,7 +208,7 @@ VALUES(1, 'ACTIVITE', 'Activité commerciale Alchimerys sprl');
|
|||
//@covers Noalyss_SQL::from_array
|
||||
public function testfrom_array()
|
||||
{
|
||||
$this->object->from_array(["po_id"=>6, "po_name"=>"Test Unitaire", "po_description"=>"", "po_amount"=>0, "pa_id"=>1]);
|
||||
$this->object->from_array(["po_id"=>6, "po_name"=>"Test Unitaire", "po_description"=>"", "po_amount"=>0, "pa_id"=>1,"po_state"=>0]);
|
||||
$this->object->insert();
|
||||
$this->object->load();
|
||||
$this->assertEquals($this->object->get("po_name"), "TESTUNITAIRE");
|
||||
|
|
@ -289,7 +291,7 @@ VALUES(1, 'ACTIVITE', 'Activité commerciale Alchimerys sprl');
|
|||
public function testbuild_query()
|
||||
{
|
||||
$str=$this->object->build_query();
|
||||
$expected=" select po_id,po_name,pa_id,po_amount,po_description,ga_id from public.poste_analytique where po_id = $1";
|
||||
$expected=" select po_id,po_name,pa_id,po_amount,po_description,ga_id,po_state from public.poste_analytique where po_id = $1";
|
||||
$this->assertEquals($str,$expected);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue