Skip to content
Snippets Groups Projects
Commit 92f85974 authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

hotline #63022 : disable artevod mass deletion risk

parent 79828f0e
Branches
Tags
4 merge requests!2334Master,!2254Master,!2253Hotline master,!2246hotline #63022 : disable artevod mass deletion risk
Pipeline #2088 passed with stage
in 20 minutes and 10 seconds
- ticket #63022 : Suite migration plateforme artevod, désactivation du script de suppression
\ No newline at end of file
......@@ -31,7 +31,9 @@ class Class_Migration_ArteVODSecondPlateform {
public function run() {
if (!$lines = $this->fetchAll('select id, notice_id from album where type_doc_id=104'))
return; // already run on all artevod subscribers, kept for historical purpose
if (!$lines = $this->fetchAll('select id, notice_id from album where type_doc_id=104'))
return;
$this
......
......@@ -1394,49 +1394,12 @@ class UpgradeDB_323_Test extends UpgradeDBTestCase {
/** obsolete */
class UpgradeDB_324_Test extends UpgradeDBTestCase {
protected
$_id_notice,
$_album_id;
public function prepare() {
try {
$this->query('insert into notices (type_doc) values (104)');
$this->_id_notice = $this->lastInsertId();
$this->query('insert into exemplaires (id_notice) values (' . $this->_id_notice . ')');
$this->query('insert into album (type_doc_id, notice_id) values (104, ' . $this->_id_notice . ')');
$this->_album_id = $this->lastInsertId();
$path = (new Class_Album())->setId($this->_album_id)->getBasePath();
mkdir($path);
touch($path . 'testing.txt');
} catch (Exception $e) {}
}
/** @test */
public function albumShouldBeDeleted() {
$data = $this->query('select * from album where id='.$this->_album_id)->fetch();
$this->assertNull($data);
}
/** @test */
public function linkedRecordShouldBeDeleted() {
$data = $this->query('select * from notices where id_notice=' . $this->_id_notice)->fetch();
$this->assertNull($data);
}
/** @test */
public function linkedItemShouldBeDeleted() {
$data = $this->query('select * from exemplaires where id_notice=' . $this->_id_notice)->fetch();
$this->assertNull($data);
}
/** @test */
public function albumDirectoryShouldBeDeleted() {
$path = (new Class_Album())->setId($this->_album_id)->getBasePath();
$this->assertFalse(file_exists($path), $path);
public function isObsolete() {
}
}
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment