From 111ae155466a680ccc3579bdcab318e20c3894b7 Mon Sep 17 00:00:00 2001 From: Matthias Meusburger <matthias.meusburger@biblibre.com> Date: Thu, 1 Oct 2015 15:21:22 +0200 Subject: [PATCH] hotline #23808 : fix tests --- library/Class/Cosmogramme/Integration/PhaseReviews.php | 2 -- .../modules/opac/controllers/AbonneControllerAvisTest.php | 4 +++- tests/library/Class/AvisNoticeTest.php | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/library/Class/Cosmogramme/Integration/PhaseReviews.php b/library/Class/Cosmogramme/Integration/PhaseReviews.php index ff9e7c2409f..132478f0c52 100644 --- a/library/Class/Cosmogramme/Integration/PhaseReviews.php +++ b/library/Class/Cosmogramme/Integration/PhaseReviews.php @@ -28,13 +28,11 @@ class Class_Cosmogramme_Integration_PhaseReviews extends Class_Cosmogramme_Integ public function __construct($phase, $log, $chrono) { parent::__construct($phase, $log, $chrono); $this->_previous_records = []; - xdebug_break(); } protected function _init($new_phase) {} public function _execute() { - xdebug_break(); while ($records = Class_AvisNotice::findAllAfter($this->_getData('pointeur_notice'), $this->_getData('pointeur'))) { diff --git a/tests/application/modules/opac/controllers/AbonneControllerAvisTest.php b/tests/application/modules/opac/controllers/AbonneControllerAvisTest.php index a17bc3dc6cc..3a39d1c3015 100644 --- a/tests/application/modules/opac/controllers/AbonneControllerAvisTest.php +++ b/tests/application/modules/opac/controllers/AbonneControllerAvisTest.php @@ -679,7 +679,7 @@ class AbonneControllerAvisBlogControllerViewCritiquesTest extends ModuleSelectio } public function testPotterIsHere() { - $this->assertQueryContentContains('h2', 'Potter'); + $this->assertQueryContentContains('h2', 'Potter',$this->_response->getBody()); } /** @test */ @@ -791,6 +791,7 @@ class AbonneControllerAvisBlogControllerViewReadAvisTest extends AbonneFlorence class AbonneControllerEditAvisNoticeNotFoundActionTest extends AbstractControllerTestCase { + protected $_storm_default_to_volatile = true; public function setUp() { parent::setUp(); $this->dispatch('/opac/abonne/editavisnotice/id/54', true); @@ -799,6 +800,7 @@ class AbonneControllerEditAvisNoticeNotFoundActionTest extends AbstractControlle /** @test */ public function responseShouldReloadPage() { + xdebug_break(); $this->assertTrue(false !== strpos(json_decode($this->_response->getBody())->title, 'Sauvegarde en cours')); } } diff --git a/tests/library/Class/AvisNoticeTest.php b/tests/library/Class/AvisNoticeTest.php index 78ae7c8d2fc..c5eb1f1177d 100644 --- a/tests/library/Class/AvisNoticeTest.php +++ b/tests/library/Class/AvisNoticeTest.php @@ -600,14 +600,14 @@ class AvisLoaderGetAvisFromPreferencesTest extends AvisTestFindAllTestCase { public function testDefaultSQLQuery() { $this->assertQueryIs("SELECT `notices_avis`.* ". "FROM `notices_avis` ". - "ORDER BY `DATE_AVIS` DESC"); + "WHERE (flags=0) ORDER BY `DATE_AVIS` DESC"); } public function testWithAllAndModoAPosteriori() { $this->preferences['abon_ou_bib'] = 'all'; $this->assertQueryIs("SELECT `notices_avis`.* ". "FROM `notices_avis` ". - "ORDER BY `DATE_AVIS` DESC"); + "WHERE (flags=0) ORDER BY `DATE_AVIS` DESC"); } @@ -616,7 +616,7 @@ class AvisLoaderGetAvisFromPreferencesTest extends AvisTestFindAllTestCase { $this->preferences['abon_ou_bib'] = 'all'; $this->assertQueryIs("SELECT `notices_avis`.* ". "FROM `notices_avis` ". - "WHERE ((STATUT=1 OR ABON_OU_BIB=1)) ". + "WHERE (flags=0) AND ((STATUT=1 OR ABON_OU_BIB=1)) ". "ORDER BY `DATE_AVIS` DESC"); } -- GitLab