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

hotline #23808 : avis , add tests for phase reviews on cosmogramme

parent f19e7e87
Branches
Tags
6 merge requests!1167Dev #23808 moderation reviews,!1154Sandbox ui reviews,!1151Hotline#23808 des avis sont affectes a des titres similaires,!1134Sandbox ui reviews,!1127Hotline#23808 des avis sont affectes a des titres similaires,!1125Hotline#23808 des avis sont affectes a des titres similaires
......@@ -28,11 +28,28 @@ class Class_Cosmogramme_Integration_PhaseReviews extends Class_Cosmogramme_Integ
public function __construct($phase, $log, $chrono) {
parent::__construct($phase, $log, $chrono);
$this->_previous_records = [];
}
protected function _init($new_phase) {
$new_phase
->resetDatas()
->setData('nombre', 0)
->setData('pointeur_notice', 0)
->setData('pointeur',
$last_update_date ? $last_update_date : '0000-00-00 00:00:00');
$this->_chrono
->startOnFile()
->startOnRecords();
}
protected function _init($new_phase) {}
public function _execute() {
xdebug_break();
$this->_setData('pointeur_notice', 0);
while ($records = Class_AvisNotice::findAllAfter($this->_getData('pointeur_notice'))) {
if (0 == ($this->_getData('nombre') % 100))
......
......@@ -106,4 +106,8 @@ class PhaseReviewsExpectedPreviousPhaseTest extends PhaseReviewsTestCase {
$this->assertLogContains('1 avis traités');
}
/** @test */
public function noticeMilleniumShouldBeAttached() {
$this->assertEquals(816,Class_AvisNotice::find(13)->getIdNotice());
}
}
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