PHPUNIT test bug #0002061: Fiche ne peuvent pas devenir inactive
This commit is contained in:
parent
439662f593
commit
ffb5cd715d
1 changed files with 21 additions and 0 deletions
|
|
@ -674,4 +674,25 @@ where
|
|||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* @testdox testUpdateEnable card enable and disable
|
||||
*/
|
||||
public function testUpdateEnable()
|
||||
{
|
||||
global $g_connection;
|
||||
$fiche= $fiche=$this->build_fiche(2,'PHPUNIT-ENABLE');
|
||||
$fiche->update($fiche->to_array());
|
||||
$this->assertEquals(1,$g_connection->get_value("select f_enable from fiche where f_id=$1",[$fiche->id])," Fiche::update card is not enabled" );
|
||||
$fiche->set_f_enable(0);
|
||||
$fiche->update($fiche->to_array());
|
||||
$this->assertEquals(0,$g_connection->get_value("select f_enable from fiche where f_id=$1",[$fiche->id])," Fiche::update card is not disabled" );
|
||||
$fiche->set_f_enable(1);
|
||||
Card_Property::update($fiche);
|
||||
$this->assertEquals(1,$g_connection->get_value("select f_enable from fiche where f_id=$1",[$fiche->id]),"Card_Property:update card is not enabled" );
|
||||
$fiche->set_f_enable(0);
|
||||
Card_Property::update($fiche);
|
||||
$this->assertEquals(0,$g_connection->get_value("select f_enable from fiche where f_id=$1",[$fiche->id]),"Card_Property:update card is not disabled" );
|
||||
$fiche->remove();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue