assertGreaterThan(\Fiche::cmp_name($fiche, $fiche_2),0); } /** * @covers Fiche::get_bk_account * @todo Implement testGet_bk_account(). */ public function testGet_bk_account() { include 'global.php'; $this->object=new Fiche($g_connection); $result=$this->object->get_bk_account(); $this->assertEquals(gettype($result),'array'); $count = count($result); $this->assertGreaterThan(0,$count); } /** * @covers Fiche::get_row */ public function testGet_row() { include 'global.php'; $card_count=$g_connection->get_array("select count(*),f_id ". " from jrnx ". " where ". " f_id is not null ". "group by f_id order by count(*) desc"); $a=new Fiche($g_connection,$card_count[0]['f_id']); try { $a->get_row(235,238); $this->assertFalse(TRUE,"Exception periode non executée"); } catch (\Exception $e) { $this->assertTrue(TRUE); } $a_result= $a->get_row(92,131); // Size == 25 $nb_result=count($a_result); $this->assertEquals ($nb_result,3,"Size array not correct "); $this->assertEquals($a_result[0][24]["deb_montant"],204.71); } }