Skip to content
Snippets Groups Projects
Commit a35f48c0 authored by efalcy's avatar efalcy
Browse files

dev #23808: reviews moderation : fix test

parent 1a04db58
Branches
Tags
2 merge requests!1167Dev #23808 moderation reviews,!1163Dev #23808 moderation reviews
......@@ -295,11 +295,12 @@ class Class_AvisNotice extends Storm_Model_Abstract {
}
public function updateNoticeAndSave() {
$this->setIdNotice(0);
$this->findNoticesByClefOeuvre();
if ($notice = $this->getFirstNotice()) {
return $this->setIdNotice($notice->getId())->updateFlags()->save();
return ($this->setIdNotice($notice->getId())->updateFlags()->save());
}
return false;
}
......@@ -361,7 +362,6 @@ class Class_AvisNotice extends Storm_Model_Abstract {
public function updateFlags() {
if ($this->getIdNotice()>0 && $this->getFlags() == Class_AvisNotice::ORPHAN_FLAG)
$this->setFlags(Class_AvisNotice::NO_FLAG);
if ($this->getIdNotice()<1 && $this->getFlags() == Class_AvisNotice::NO_FLAG)
......
......@@ -62,7 +62,7 @@ class PhaseReviewsExpectedPreviousPhaseTest extends PhaseReviewsTestCase {
'valeur' => 1000]);
$this->millenium = $this->fixture('Class_Notice', ['id' => 816,
'titre_principal' => 'M',
'titre_principal' => 'Millenium',
'clef_oeuvre' => 'MILLENIUM',
'auteur_principal' => 'Stieg Larsson',
'url_vignette' => '',
......
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