FIX SQL request and phpunit
This commit is contained in:
parent
2813c9d4b4
commit
9100b8a548
@ -1712,7 +1712,7 @@ class Holiday extends CommonObject
|
||||
// We want only list of vacation balance for user ids
|
||||
$sql = "SELECT DISTINCT cpu.fk_user";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."holiday_users as cpu, ".MAIN_DB_PREFIX."user as u";
|
||||
$sql.= " WHERE cpu.fk_user = u.user";
|
||||
$sql.= " WHERE cpu.fk_user = u.rowid";
|
||||
if ($filters) $sql.=$filters;
|
||||
|
||||
$resql=$this->db->query($sql);
|
||||
|
||||
@ -247,21 +247,17 @@ class HolidayTest extends PHPUnit\Framework\TestCase
|
||||
$langs=$this->savlangs;
|
||||
$db=$this->savdb;
|
||||
|
||||
//$localobject->fetch($localobject->id);
|
||||
$result = $localobject->fetchUsers(true, true, '');
|
||||
$this->assertNotEquals($result, -1);
|
||||
|
||||
/*
|
||||
$result=$localobject->getNomUrl(1);
|
||||
print __METHOD__." id=".$localobject->id." result=".$result."\n";
|
||||
$this->assertNotEquals($result, '');
|
||||
$result = $localobject->fetchUsers(true, false, '');
|
||||
$this->assertNotEquals($result, -1);
|
||||
|
||||
$result=$localobject->getFullAddress(1);
|
||||
print __METHOD__." id=".$localobject->id." result=".$result."\n";
|
||||
$this->assertContains("New address\nNew zip New town\nBelgium", $result);
|
||||
$result = $localobject->fetchUsers(false, true, '');
|
||||
$this->assertNotEquals($result, -1);
|
||||
|
||||
$localobject->info($localobject->id);
|
||||
print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n";
|
||||
$this->assertNotEquals($localobject->date_creation, '');
|
||||
*/
|
||||
$result = $localobject->fetchUsers(false, false, '');
|
||||
$this->assertNotEquals($result, -1);
|
||||
|
||||
return $localobject->id;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user