From a454e90c8316de3aef0cf85fe03d5283e146634c Mon Sep 17 00:00:00 2001 From: Ghislain Loas <ghislo@sandbox.pergame.net> Date: Thu, 8 Jan 2015 14:58:02 +0100 Subject: [PATCH] remove default to volatile du to side failures --- .../opac/controllers/PanierControllerTest.php | 3 --- .../controllers/ProfilOptionsControllerTest.php | 1 - tests/library/Class/PanierNoticeTest.php | 3 --- tests/library/Class/SuggestionAchatTest.php | 13 ++++++------- 4 files changed, 6 insertions(+), 14 deletions(-) diff --git a/tests/application/modules/opac/controllers/PanierControllerTest.php b/tests/application/modules/opac/controllers/PanierControllerTest.php index 79fcf58189f..79ed8e97cad 100644 --- a/tests/application/modules/opac/controllers/PanierControllerTest.php +++ b/tests/application/modules/opac/controllers/PanierControllerTest.php @@ -1659,9 +1659,6 @@ class PanierControllerIndexedByEditActionTest extends PanierControllerTestCase { class PanierControllerDesindexedByMajTitreTest extends PanierControllerTestCase { public function setUp() { parent::setUp(); - - Storm_Model_Loader::defaultToVolatile(); - $this->fixture('Class_NoticeDomain', ['id' => 1, 'domain_id' => 97, diff --git a/tests/application/modules/opac/controllers/ProfilOptionsControllerTest.php b/tests/application/modules/opac/controllers/ProfilOptionsControllerTest.php index ff61ca3d6b1..dedf18b57b1 100644 --- a/tests/application/modules/opac/controllers/ProfilOptionsControllerTest.php +++ b/tests/application/modules/opac/controllers/ProfilOptionsControllerTest.php @@ -301,7 +301,6 @@ abstract class ProfilOptionsControllerWithProfilAdulteTestCase extends AbstractC class ProfilOptionsControllerProfilAdulteWithCacheTest extends ProfilOptionsControllerWithProfilAdulteTestCase { public function setUp(){ parent::setUp(); - Storm_Model_Loader::defaultToDb(); $this->fixture('Class_AdminVar', ['id'=>'AFFICHER_DISPONIBILITE_SUR_RECHERCHE', 'valeur'=>1] ); $this->fixture('Class_AdminVar', ['id'=>'CACHE_ACTIF', 'valeur'=>1] ); $this->dispatch('/'); diff --git a/tests/library/Class/PanierNoticeTest.php b/tests/library/Class/PanierNoticeTest.php index 6e4166a8639..75da27a8f8c 100644 --- a/tests/library/Class/PanierNoticeTest.php +++ b/tests/library/Class/PanierNoticeTest.php @@ -387,9 +387,6 @@ class PanierNoticeWithWrongUserIdTest extends PanierNoticeWithThreeNoticesTestCa class PanierNoticeIndexAllTest extends ModelTestCase { public function setUp() { parent::setUp(); - - Storm_Model_Loader::defaultToVolatile(); - $this->fixture('Class_Notice', ['id' => 4, 'titre_principal' => 'Le Montespan', 'auteur_principal' => 'Jean Teulテδゥ', diff --git a/tests/library/Class/SuggestionAchatTest.php b/tests/library/Class/SuggestionAchatTest.php index 59c19ca4b4d..07cb64b3fe4 100644 --- a/tests/library/Class/SuggestionAchatTest.php +++ b/tests/library/Class/SuggestionAchatTest.php @@ -16,7 +16,7 @@ * * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE * along with BOKEH; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -43,7 +43,7 @@ abstract class SuggestionAchatTestCase extends Storm_Test_ModelTestCase { 'annexes' => '4;8', 'sections' => '9;10']); - $type_doc=$this->fixture('Class_TypeDoc', ['id'=>Class_TypeDoc::LIVRE, + $type_doc=$this->fixture('Class_TypeDoc', ['id'=>Class_TypeDoc::LIVRE, 'codif_type_doc' => $codif_type_doc, 'label'=> 'Livres Numériques']); @@ -71,21 +71,20 @@ class SuggestionAchatMailTest extends SuggestionAchatTestCase { public function setUp() { parent::setUp(); - $this->_suggestion->sendMail('noreply@astromelun.fr'); $this->_sent_mail = $this->_mock_transport->sent_mail; } protected function assertBodyContains($text) { - $this->assertContains($text, + $this->assertContains($text, quoted_printable_decode($this->_sent_mail->getBodyText()->getContent())); } /** @test */ public function mailSubjectShouldBeSuggestionAchatHarryPotter() { - $this->assertEquals('Suggestion d\'achat: Harry emPotté', + $this->assertEquals('Suggestion d\'achat: Harry emPotté', quoted_printable_decode($this->_sent_mail->getSubject())); } @@ -174,7 +173,7 @@ class SuggestionAchatMailErrorsTest extends SuggestionAchatTestCase { public function withoutMailSiteShouldSendMailOnlyToUser() { Class_Profil::getCurrentProfil()->setMailSuggestionAchat(''); $this->_suggestion->sendMail('noreply@astromelun.fr'); - $this->assertEquals(['sbelle@gmail.com'], + $this->assertEquals(['sbelle@gmail.com'], $this->_mock_transport->sent_mail->getRecipients()); } @@ -183,7 +182,7 @@ class SuggestionAchatMailErrorsTest extends SuggestionAchatTestCase { public function withoutMailUserShouldSendMailOnlyToMailProfil() { $this->_suggestion->getUser()->setMail(''); $this->_suggestion->sendMail('noreply@astromelun.fr'); - $this->assertEquals(['laurent@afi-sa.fr', 'patrick@afi-sa.fr', 'estelle@afi-sa.fr'], + $this->assertEquals(['laurent@afi-sa.fr', 'patrick@afi-sa.fr', 'estelle@afi-sa.fr'], $this->_mock_transport->sent_mail->getRecipients()); } } -- GitLab