22 |
* base, ainsi que les dossiers sans P0 PA0130551200001 et DP0130551200001 |
* base, ainsi que les dossiers sans P0 PA0130551200001 et DP0130551200001 |
23 |
* les dossiers et document présent dans binary_files/test_digitalizedDocument |
* les dossiers et document présent dans binary_files/test_digitalizedDocument |
24 |
*/ |
*/ |
25 |
class DigitalizedDocumentTest extends PHPUnit_Framework_TestCase { |
class DigitalizedDocumentTest extends PHPUnit\Framework\TestCase { |
26 |
|
|
27 |
var $digitalizedDocument = NULL; |
var $digitalizedDocument = NULL; |
28 |
|
|
93 |
$this->digitalizedDocument = new DigitalizedDocument($f); |
$this->digitalizedDocument = new DigitalizedDocument($f); |
94 |
} |
} |
95 |
|
|
96 |
public function onNotSuccessfulTest(Exception $e){ |
public function onNotSuccessfulTest(Throwable $e){ |
97 |
echo 'Line '.$e->getLine().' : '.$e->getMessage()."\r\n"; |
echo 'Line '.$e->getLine().' : '.$e->getMessage()."\r\n"; |
98 |
parent::onNotSuccessfulTest($e); |
parent::onNotSuccessfulTest($e); |
99 |
} |
} |
477 |
rename($pathSrc_no_p0.'/'."20091106AUTPCP.pdf", $pathSrc_no_p0.'/'."20091106NDL.pdf"); |
rename($pathSrc_no_p0.'/'."20091106AUTPCP.pdf", $pathSrc_no_p0.'/'."20091106NDL.pdf"); |
478 |
rename($pathSrc_no_p0.'/'."20091106AUTPCP-1.pdf", $pathSrc_no_p0.'/'."20091106NDL-1.pdf"); |
rename($pathSrc_no_p0.'/'."20091106AUTPCP-1.pdf", $pathSrc_no_p0.'/'."20091106NDL-1.pdf"); |
479 |
|
|
|
//Déclarations paramètre |
|
|
$db = $this->digitalizedDocument->f->db; |
|
|
$DEBUG = NULL; |
|
480 |
//Retour de la fonction run_import |
//Retour de la fonction run_import |
481 |
$run_import = $this->digitalizedDocument->run_import($pathSrc, $pathDes, $db, $DEBUG); |
$run_import = $this->digitalizedDocument->run_import($pathSrc, $pathDes); |
482 |
$run_import_no_p0 = $this->digitalizedDocument->run_import($pathSrc_no_p0, $pathDes_no_p0, $db, $DEBUG); |
$run_import_no_p0 = $this->digitalizedDocument->run_import($pathSrc_no_p0, $pathDes_no_p0); |
483 |
//On vérifie que l'action s'est bien déroulée |
//On vérifie que l'action s'est bien déroulée |
484 |
$this->assertEquals($run_import, true); |
$this->assertEquals($run_import, true); |
485 |
$this->assertEquals($run_import_no_p0, true); |
$this->assertEquals($run_import_no_p0, true); |