58 |
unlink('../var/digitalization/Todo/PC0130551200001.P0/20091106AUTPCP-1.pdf'); |
unlink('../var/digitalization/Todo/PC0130551200001.P0/20091106AUTPCP-1.pdf'); |
59 |
unlink('../var/digitalization/Todo/PA0130551200001/20091106AUTPCP.pdf'); |
unlink('../var/digitalization/Todo/PA0130551200001/20091106AUTPCP.pdf'); |
60 |
unlink('../var/digitalization/Todo/PA0130551200001/20091106AUTPCP-1.pdf'); |
unlink('../var/digitalization/Todo/PA0130551200001/20091106AUTPCP-1.pdf'); |
61 |
|
|
62 |
// Suppression des dossiers PC0130551200001.P0 et PC0130551200002.P0 |
// Suppression des dossiers PC0130551200001.P0 et PC0130551200002.P0 |
63 |
if(file_exists('../var/digitalization/Todo/PC0130551200001.P0')) { |
if(file_exists('../var/digitalization/Todo/PC0130551200001.P0')) { |
64 |
rmdir('../var/digitalization/Todo/PC0130551200001.P0'); |
rmdir('../var/digitalization/Todo/PC0130551200001.P0'); |
116 |
FROM ".DB_PREFIXE."document_numerise |
FROM ".DB_PREFIXE."document_numerise |
117 |
WHERE uid = '".$uid."'"; |
WHERE uid = '".$uid."'"; |
118 |
$document_numerise = $this->digitalizedDocument->f->db->getOne($sql); |
$document_numerise = $this->digitalizedDocument->f->db->getOne($sql); |
|
$this->digitalizedDocument->f->addToLog("tests/testDigitalizedDocument.php : db->getOne(".$sql.")", VERBOSE_MODE); |
|
119 |
$this->digitalizedDocument->f->isDatabaseError($document_numerise); |
$this->digitalizedDocument->f->isDatabaseError($document_numerise); |
120 |
|
|
121 |
//Si le lien a été trouvé on retourne vrai |
//Si le lien a été trouvé on retourne vrai |
139 |
FROM ".DB_PREFIXE."document_numerise |
FROM ".DB_PREFIXE."document_numerise |
140 |
WHERE document_numerise = '".$document_numerise."'"; |
WHERE document_numerise = '".$document_numerise."'"; |
141 |
$uid = $this->digitalizedDocument->f->db->getOne($sql); |
$uid = $this->digitalizedDocument->f->db->getOne($sql); |
|
$this->digitalizedDocument->f->addToLog("tests/testDigitalizedDocument.php : db->getOne(".$sql.")", VERBOSE_MODE); |
|
142 |
$this->digitalizedDocument->f->isDatabaseError($uid); |
$this->digitalizedDocument->f->isDatabaseError($uid); |
143 |
|
|
144 |
// |
// |
246 |
* Test la fonction createFileTemporary |
* Test la fonction createFileTemporary |
247 |
*/ |
*/ |
248 |
public function testCreateFileTemporary() { |
public function testCreateFileTemporary() { |
249 |
|
|
250 |
|
// XXX hack temporaire : la commande suivante permet de ne pas avoir d'erreurs de |
251 |
|
// permissions système dues à l'enchaînement des tests *testREST.php* et |
252 |
|
// *testDigitalizedDocument.php* |
253 |
|
exec("sudo chmod 777 -R ../var > /dev/null 2>&1"); |
254 |
|
|
255 |
//Nom possible d'un répertoire |
//Nom possible d'un répertoire |
256 |
$foldername = "PC0130551200001.P0"; |
$foldername = "PC0130551200001.P0"; |
257 |
$foldername_no_p0 = "PA0130551200001"; |
$foldername_no_p0 = "PA0130551200001"; |
499 |
* Test la fonction run_purge |
* Test la fonction run_purge |
500 |
*/ |
*/ |
501 |
public function test_run_purge() { |
public function test_run_purge() { |
502 |
|
copy('binary_files/20091106AUTPCP.pdf', '../var/digitalization/Todo/PC0130551200001.P0/20091106AUTPCP.pdf'); |
503 |
|
copy('binary_files/20091106AUTPCP-1.pdf', '../var/digitalization/Todo/PC0130551200001.P0/20091106AUTPCP-1.pdf'); |
504 |
|
copy('binary_files/20091106AUTPCP.pdf', '../var/digitalization/Todo/PA0130551200001/20091106AUTPCP.pdf'); |
505 |
|
copy('binary_files/20091106AUTPCP-1.pdf', '../var/digitalization/Todo/PA0130551200001/20091106AUTPCP-1.pdf'); |
506 |
//Dossier source |
//Dossier source |
507 |
$pathSrc = "../var/digitalization/Todo/PC0130551200001.P0"; |
$pathSrc = "../var/digitalization/Todo/PC0130551200001.P0"; |
508 |
$pathSrc_no_p0 = "../var/digitalization/Todo/PA0130551200001"; |
$pathSrc_no_p0 = "../var/digitalization/Todo/PA0130551200001"; |