diff --git a/VERSIONS_HOTLINE/#26137 b/VERSIONS_HOTLINE/#26137
new file mode 100644
index 0000000000000000000000000000000000000000..d6222c5415870501b1ab8721cfb248e5f0911304
--- /dev/null
+++ b/VERSIONS_HOTLINE/#26137
@@ -0,0 +1 @@
+ - ticket #26137 : Les balises html insérées dans les réponses de formulaires sont maintenant supprimées.
\ No newline at end of file
diff --git a/VERSIONS_HOTLINE/#26993 b/VERSIONS_HOTLINE/#26993
new file mode 100644
index 0000000000000000000000000000000000000000..664b618d3c9035ad42596999199dc689e69c1242
--- /dev/null
+++ b/VERSIONS_HOTLINE/#26993
@@ -0,0 +1 @@
+ - ticket #26993 : Correction de l'intégration des notices de dépouillement des périodiques provenant de Nanook.
\ No newline at end of file
diff --git a/VERSIONS_HOTLINE/#28241 b/VERSIONS_HOTLINE/#28241
new file mode 100644
index 0000000000000000000000000000000000000000..0f87182e11d5c41b46914990cee77991f00812be
--- /dev/null
+++ b/VERSIONS_HOTLINE/#28241
@@ -0,0 +1 @@
+ - ticket #28241 : Les messages d'alerte en haut de l'écran sont maitenant détectés par les outils d'accessibilité.
\ No newline at end of file
diff --git a/VERSIONS_HOTLINE/#29082 b/VERSIONS_HOTLINE/#29082
new file mode 100644
index 0000000000000000000000000000000000000000..fc21cdc8e137debd1608ff68ca43cff1264a279f
--- /dev/null
+++ b/VERSIONS_HOTLINE/#29082
@@ -0,0 +1 @@
+ - ticket #29082 : correction de l'indexation des articles et des sitothèques dans les domaines
\ No newline at end of file
diff --git a/VERSIONS_HOTLINE/26961 b/VERSIONS_HOTLINE/26961
new file mode 100644
index 0000000000000000000000000000000000000000..4bda6a04e3bd680e7e307b597f5c842c41debee2
--- /dev/null
+++ b/VERSIONS_HOTLINE/26961
@@ -0,0 +1 @@
+ - ticket #26961 : correction du décalage du pointeur de localisation des documents sur le plan des exemplaires
\ No newline at end of file
diff --git a/VERSIONS_HOTLINE/29043 b/VERSIONS_HOTLINE/29043
new file mode 100644
index 0000000000000000000000000000000000000000..b0b210089e1e321c27ca349939e969643a3832e5
--- /dev/null
+++ b/VERSIONS_HOTLINE/29043
@@ -0,0 +1 @@
+ - ticket #29043 : Correction de la prise en compte du décodage des accents pour les fichiers code barres de suppression d'exemplaires
\ No newline at end of file
diff --git a/application/modules/admin/views/scripts/modo/formulaires.phtml b/application/modules/admin/views/scripts/modo/formulaires.phtml
index 53b71b53ab3e5723c0540d62a8c7d28da4ac0628..288ddfd5ae9d689c455fe3d5b48f5f6fff6b9456 100644
--- a/application/modules/admin/views/scripts/modo/formulaires.phtml
+++ b/application/modules/admin/views/scripts/modo/formulaires.phtml
@@ -1,5 +1,5 @@
 <h1><?php echo $this->_('Modération des formulaires: '.$this->article->getTitre());?></h1>
-<?php 
+<?php
 if($this->liste==='all')
 echo $this->tagAnchor($this->url(['module'=>'admin',
                                   'controller'=>'modo',
@@ -31,8 +31,8 @@ echo $this->tagAnchor($this->url(['module'=>'admin',
     <thead>
       <tr>
         <th><?php echo $this->_('Date') ?></th>
-        <th><?php echo $this->_('Posté par') ?></th> 
-        <th><?php echo $this->_('Bibliothèque') ?></th> 
+        <th><?php echo $this->_('Posté par') ?></th>
+        <th><?php echo $this->_('Bibliothèque') ?></th>
         <?php foreach($data_names as $name) echo '<th>'.$name.'</th>'; ?>
           <th><?php echo $this->_('Actions') ?></th>
       </tr>
@@ -40,14 +40,14 @@ echo $this->tagAnchor($this->url(['module'=>'admin',
     <tbody>
       <?php
       foreach($this->formulaires as $formulaire) {
-        $datas = [$this->humanDate($formulaire->getDateCreation(), 'dd/MM/yyyy'), 
-                  $formulaire->getCompte(), 
+        $datas = [$this->humanDate($formulaire->getDateCreation(), 'dd/MM/yyyy'),
+                  $formulaire->getCompte(),
                   $formulaire->getLibelleBib()];
         foreach($data_names as $name)
         $datas[]=$formulaire->getDataNamed($name);
 
         echo '<tr>';
-        foreach($datas as $data) echo '<td>'.$data.'</td>';
+        foreach($datas as $data) echo '<td>' . $this->escape($data) . '</td>';
 
         echo '<td>';
         echo $this->tagAnchor(['action' => 'visualiser-reponse-ajax',
@@ -59,7 +59,7 @@ echo $this->tagAnchor($this->url(['module'=>'admin',
         echo $this->tagAnchor(['action' => 'validate-formulaire',
                                'id' => $formulaire->getId()],
                               $this->boutonIco('type=validate'));
-        
+
         echo '</td>';
         echo '</tr>';
       }
diff --git a/cosmogramme/php/classes/classe_jsredirect.php b/cosmogramme/php/classes/classe_jsredirect.php
index d5bb914113a1e6723f6d2ec3c4c1c5e29a955879..9f80467f8aa9506abad41e8c18bad2bef5bdf15c 100644
--- a/cosmogramme/php/classes/classe_jsredirect.php
+++ b/cosmogramme/php/classes/classe_jsredirect.php
@@ -16,14 +16,14 @@
  *
  * 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
  */
 
 class JSRedirect {
 	public function render($url) {
-		if ((0!== strpos($url, URL_BASE)) && (strleft($url,4) != "http"))
+		if ((0!== strpos($url, URL_BASE)) && (substr($url, 0, 4) != "http"))
 			$url=URL_BASE."php/".$url;
-	return 
+	return
 		'<script>'
 		.'document.location="'.$url.'"'
 		.'</script>';
diff --git a/cosmogramme/php/classes/classe_notice_ascii.php b/cosmogramme/php/classes/classe_notice_ascii.php
index 6f712f6eaee7a5c8e848e212adf6da2ff26a2699..bf8cd4e982da586ab68d742242544ecc1a2b3b3a 100644
--- a/cosmogramme/php/classes/classe_notice_ascii.php
+++ b/cosmogramme/php/classes/classe_notice_ascii.php
@@ -134,7 +134,7 @@ class notice_ascii
 // ----------------------------------------------------------------
 	public function getExemplaire()
 	{
-		$ex["code_barres"]=strleft(trim($this->enreg["code_barres"]),20);
+		$ex["code_barres"]=substr(trim($this->enreg["code_barres"]), 0, 20);
 		$ex["cote"]=$this->enreg["cote"];
 		$ex["activite"]=$this->enreg["activite"];
 		if( !$ex["activite"] ) $ex["activite"]="non disponible";
diff --git a/cosmogramme/php/classes/classe_notice_integration.php b/cosmogramme/php/classes/classe_notice_integration.php
index cc2dd99cefc8384b55986e78be6f1e0ee3f0615a..74f4c5da3ef76d04796890bc994031380523ac43 100644
--- a/cosmogramme/php/classes/classe_notice_integration.php
+++ b/cosmogramme/php/classes/classe_notice_integration.php
@@ -27,10 +27,16 @@ require_once("classe_codif_langue.php");
 require_once("classe_profil_donnees.php");
 
 class notice_integration {
-	const RECORD_RENEW = 5;
-	const RECORD_UPDATE = 4;
-
-	const STATUS_NOTFOUND = 'non trouvée';
+  const
+    RECORD_REJECT = 0,
+    RECORD_INSERT = 1,
+    RECORD_DELETE = 2,
+    RECORD_FULLUPDATE = 3,
+    RECORD_UPDATE = 4,
+    RECORD_RENEW = 5,
+    RECORD_UPGRADE = 6,
+    RECORD_SUCCINCT = 7,
+    STATUS_NOTFOUND = 'non trouvée';
 
 	private $id_profil;									// Id du profil de données initialisé
 	private $format;										// Format de fichier 0=unimarc
@@ -45,7 +51,16 @@ class notice_integration {
 	private $qualite_bib;								// Code qualite de la bib
 	private $sigb;											// Sigb de la bib
 	private $statut;										// Statut de la notice traitee
-	public  $libStatut=array("Rejetées","Créée","Supprimée","Mise à jour notice et exemplaires","Mise à jour exemplaires","Remplacées","Homogénéisées","Mises en notices succintes");
+
+	public  $libStatut = [self::RECORD_REJECT =>  "Rejetées",
+                        self::RECORD_INSERT =>  "Créée",
+                        self::RECORD_DELETE =>  "Supprimée",
+                        self::RECORD_FULLUPDATE => "Mise à jour notice et exemplaires",
+                        self::RECORD_UPDATE =>  "Mise à jour exemplaires",
+                        self::RECORD_RENEW =>   "Remplacées",
+                        self::RECORD_UPGRADE => "Homogénéisées",
+                        self::RECORD_SUCCINCT =>"Mises en notices succintes"];
+
 	private $erreur;										// Message d'erreur notice traitee
 	private $filtrer_fulltext;					// Vient de la variable filtrer_fulltext.
 	private $identification;						// Mode d'identification de la notice
@@ -922,69 +937,81 @@ class notice_integration {
 // --------------------------------------------------------------------------------
 // Ecrit une notice : article de périodique
 // --------------------------------------------------------------------------------
-	private function ecrireArticlePeriodique()
-	{
+	private function ecrireArticlePeriodique() {
 		global $sql;
 
-		// identifiants
-		$clef_chapeau=$this->notice["clef_chapeau"];
-		$clef_numero=$this->notice["clef_numero"];
-		$clef_article=$this->notice["clef_article"];
-		$clef_unimarc=$this->notice["clef_unimarc"];
+		if( 1 == $this->notice["statut"])
+      return $this->deleteRecordArticles();
+
+    $title_key = hash('crc32b', $this->notice['titre_princ']);
+
+    $unimarc_key = $this->notice["clef_unimarc"]
+      ? $this->notice["clef_unimarc"]
+      : $title_key;
+
+    $article_from_record = Class_Notice_SerialArticles::newInstance(['clef_chapeau' => $this->notice["clef_chapeau"],
+                                                                     'clef_numero' => $this->notice["clef_numero"],
+                                                                     'clef_unimarc' => $unimarc_key,
+                                                                     'unimarc' => $this->notice['unimarc'],
+                                                                     'date_maj' => dateDuJour(0),
+                                                                     'qualite' => $this->qualite_bib,
+                                                                     'clef_article' => $this->notice['clef_article']]);
+
+    if(!$this->notice['clef_unimarc']) {
+      $common_attribs = ['clef_chapeau' => $this->notice['clef_chapeau'],
+                         'clef_numero' => $this->notice['clef_numero']];
+
+			if(!$article = Class_Notice_SerialArticles::findFirstBy(array_merge($common_attribs, ['clef_unimarc' => $title_key])))
+        $article = Class_Notice_SerialArticles::findFirstBy(array_merge($common_attribs, ['clef_article' => $this->notice['clef_article'],
+                                                                                          'clef_unimarc' => '']));
+      return $this->updateOrInsertArticle($article, $article_from_record);
+    }
+
+    if ($article = Class_Notice_SerialArticles::findFirstBy(['clef_unimarc' => $this->notice['clef_unimarc']])) {
+				$article_from_record->setClefChapeau($article->getClefChapeau());
+				$article_from_record->setClefNumero($article->getClefNumero());
+        return $this->updateOrInsertArticle($article, $article_from_record);
+    }
+	}
 
-		// suppression
-		if($this->notice["statut"]==1)
-		{
-			$this->statut=2;
-			if($clef_unimarc)
-				$controle=$sql->execute("delete from notices_articles where clef_unimarc='$clef_unimarc'");
-			else
-				$controle=$sql->execute("delete from notices_articles where clef_chapeau='$clef_chapeau' and clef_numero='$clef_numero' and clef_article='$clef_article'" );
-			if(!$controle)
-			{
-				$this->statut=0;
-				$this->erreur="notice à supprimer non reconnue";
-			}
-			return;
-		}
 
-		// constitution enregistrement
-		$enreg["clef_chapeau"]=$clef_chapeau;
-		$enreg["clef_numero"]=$clef_numero;
-		$enreg["clef_article"]=$clef_article;
-		$enreg["clef_unimarc"]=$clef_unimarc;
-		$enreg["unimarc"]=$this->notice["unimarc"];
-		$enreg["date_maj"]=dateDuJour(0);
-		$enreg["qualite"]=$this->qualite_bib;
-
-		// cherche la notice
-		if($clef_unimarc)	{
-			if ($article = Class_Notice_SerialArticles::findFirstBy(['clef_unimarc' => $clef_unimarc])) {
-				$enreg["clef_chapeau"] = $article->getClefChapeau();
-				$enreg["clef_numero"] = $article->getClefNumero();
-			}
-		}
-		else
-			$article = Class_Notice_SerialArticles::findFirstBy(['clef_chapeau' => $clef_chapeau,
-																													 'clef_numero' => $clef_numero,
-																													 'clef_article' => $clef_article]);
+  protected function updateOrInsertArticle($article, $article_from_record) {
+    return $article
+      ? $this->updateArticleWith($article, $article_from_record)
+      : $this->insertArticleWith($article_from_record);
+  }
 
-		// ecrire
-		if($article)
-		{
-			// remplacer si qualite superieure ou egale
-			if($enreg["qualite"] >= $article->getQualite())	{
-				$article->updateAttributes($enreg)->save();
-				$this->statut=5;
+
+  protected function insertArticleWith($article_from_record) {
+		Class_Notice_SerialArticles::newInstance($article_from_record->toArray())->save();
+    Class_Notice_SerialArticles::clearCache();
+    $this->statut = self::RECORD_INSERT;
+    return;
+  }
+
+
+  protected function updateArticleWith($article, $article_from_record) {
+    if($enreg["qualite"] >= $article->getQualite())	{
+      $article->updateAttributes($article_from_record->toArray())->save();
+      $this->statut = self::RECORD_RENEW;
+    }
+  }
+
+
+  protected function deleteRecordArticles() {
+    $this->statut = self::RECORD_DELETE;
+
+    if($this->notice["clef_unimarc"])
+      $controle = $sql->execute("delete from notices_articles where clef_unimarc='$clef_unimarc'");
+    else
+      $controle = $sql->execute("delete from notices_articles where clef_chapeau='$clef_chapeau' and clef_numero='$clef_numero' and clef_article='$clef_article'" );
+
+    if(!$controle) {
+				$this->statut = 0;
+				$this->erreur = "notice à supprimer non reconnue";
 			}
-		}
-		else
-		{
-			Class_Notice_SerialArticles::newInstance($enreg)->save();
-			Class_Notice_SerialArticles::clearCache();
-			$this->statut=1;
-		}
-	}
+  }
+
 
 // --------------------------------------------------------------------------------
 // Recupere titre, auteurs, matieres pour 1 article de périodique
diff --git a/cosmogramme/php/classes/classe_unimarc.php b/cosmogramme/php/classes/classe_unimarc.php
index 7d1d7bc364e0cfc1625abbe9febf79b3ce05c387..65b5ac0c879cb355ab7178791e9c2bef894a2cbc 100644
--- a/cosmogramme/php/classes/classe_unimarc.php
+++ b/cosmogramme/php/classes/classe_unimarc.php
@@ -719,7 +719,7 @@ class notice_unimarc extends iso2709_record {
 		if ($this->controle_codes_barres == 1)
 			return utf8_encode(addslashes($code_barres));
 
-		$cab = trim(strleft($code_barres, 20));
+		$cab = substr(trim($code_barres), 0, 20);
 		if (is_numeric($code_barres))
 			return $cab;
 
diff --git a/cosmogramme/tests/php/classes/NanookRecordsIntegrationTest.php b/cosmogramme/tests/php/classes/NanookRecordsIntegrationTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..325a27b8c420da98d5cafdc6f323c5525efaa0e7
--- /dev/null
+++ b/cosmogramme/tests/php/classes/NanookRecordsIntegrationTest.php
@@ -0,0 +1,484 @@
+<?php
+/**
+ * Copyright (c) 2012, Agence Française Informatique (AFI). All rights reserved.
+ *
+ * BOKEH is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
+ * the Free Software Foundation.
+ *
+ * There are special exceptions to the terms and conditions of the AGPL as it
+ * is applied to this software (see README file).
+ *
+ * BOKEH is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * 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
+ */
+
+
+require_once('NoticeIntegrationTest.php');
+
+abstract class NanookRecordsIntegrationTestCase extends NoticeIntegrationTestCase {
+	public function getProfilDonnees() {
+		$profil = Class_IntProfilDonnees::forNanook()->setIdProfil(110);
+		return $profil->getRawAttributes();
+  }
+}
+
+
+/** @see http://forge.afi-sa.fr/issues/13769 */
+class NanookRecordsIntegrationAvailabilityFacetTest extends NanookRecordsIntegrationTestCase {
+	public function getProfilDonnees() {
+		return Class_IntProfilDonnees::forNanook()
+			->setIdProfil(110)
+			->setAvailabilityField('v')
+			->getRawAttributes();
+	}
+
+
+	public function setUp() {
+		parent::setUp();
+
+		/*
+		 * cf class_unimarc: [[file:../../../php/classes/classe_unimarc.php::$notice%5B"sections"%5D%5B%5D%20%3D%20$exemplaire%5B"section"%5D%3B][item data to record]] ,
+		 * [[file:../../../php/classes/classe_unimarc.php::if%20($champ_availability%20and%20$champ%5B'code'%5D%20%3D%3D%20$champ_availability)%20{][item parse unimarc]]
+		 */
+		$writer = new Class_NoticeUnimarc_Writer();
+		$writer->setNotice(file_get_contents(dirname(__FILE__)."/unimarc_symphonie.txt"));
+		$writer->add_field('995',
+											 '  ',
+											 [
+												['f', '12345'],
+												['v', '1']
+											 ]);
+		$writer->add_field('995',
+											 '  ',
+											 [
+												['f', '12346'],
+												['v', 'ordered']
+											 ]);
+
+		$writer->update();
+
+		$this->loadNoticeFromString($writer->getFullRecord());
+		Class_Notice::find(1)->updateFacetsFromExemplaires();
+
+	}
+
+
+	/** @test */
+	public function firstItemShouldNotBeAvailable() {
+		$this->assertFalse(Class_Exemplaire::find(1)->isDisponible(true));
+	}
+
+
+	/** @test */
+	public function secondItemShouldBeAvailable() {
+		$this->assertTrue(Class_Exemplaire::find(2)->isDisponible(true));
+	}
+
+
+	/** @test */
+	public function thirdItemShouldNotBeAvailable() {
+		$this->assertFalse(Class_Exemplaire::find(3)->isDisponible(true));
+	}
+
+
+  /** @test */
+	public function noticeShouldContainsFacetV1() {
+		$this->assertContains('V1', Class_Notice::find(1)->getFacettes());
+	}
+}
+
+
+
+/** @see http://forge.afi-sa.fr/issues/16358 */
+class NanookRecordsIntegrationSymphonieTest extends NanookRecordsIntegrationTestCase {
+	public function getProfilDonnees() {
+		$profil = Class_IntProfilDonnees::forNanook()->setIdProfil(110);
+		return $profil->getRawAttributes();
+	}
+
+
+	public function setUp() {
+		parent::setUp();
+
+		$symphonie = $this->fixture('Class_Notice',
+																['id' => 1,
+																 'type_doc' => 3,
+																 'alpha_titre' => 'SYMPHONIES 38  PRAGUE    41  JUPITER',
+																 'alpha_auteur' => 'MOZART WOLFGANG AMADEUS',
+																 'titres' => 'SYMPHONIES SINFONI 38  PRAGUE PRAG 41 JUPITER JUPIT',
+																 'auteurs' => 'MOZART MOZAR WOLFGANG OLFGANG AMADEUS AMAD JACOBS JAKOB RENE RAN FREIBURGER FREIBURJ BAROCKORCHESTER BAROKORKEST',
+																 'editeur' => 'Harmonia Mundi',
+																 'collection' => '',
+																 'matieres' => 'MUSIQUE MUSIK 18E  SIECLE SIEKL AUTRICHE OTRICH',
+																 'dewey' => '',
+																 'facettes' => '  A1 A2 A3 M1 T3 B1',
+																 'cote' => '3 MOZ 24',
+																 'isbn' => '',
+																 'ean' => '3149020195840',
+																 'id_commerciale' => 'HARMONIAMUNDI2901958SYMPHONIES38PRAGUE41',
+																 'id_bnf' => '',
+																 'clef_alpha' => 'SYMPHONIES38PRAGUE41JUPITER--MOZARTW--HARMONIAMUNDI-2012-3',
+																 'clef_oeuvre' => 'SYMPHONIES38PRAGUE41JUPITER--MOZARTW-',
+																 'clef_chapeau' => '',
+																 'tome_alpha' => '',
+																 'annee' => 2010,
+																 'qualite' => 5,
+																 'exportable' => 1,
+																 'date_creation' => '2000-01-01 00:00:00',
+																 'date_maj' => '2014-09-16 12:25:58',
+																 'unimarc' => "02135njm0 2200409   450 001000700000010001100007071002800018073001800046100004500064126004500109200013500154210002500289215002800314300002800342345002200370464006700392464005900459464006600518464006600584464006900650464007800719464006500797610003600862686004700898700005800945702005201003702005701055801002201112856006701134856005901201856006601260856006601326856006901392856007801461856006501539992012101604196508  d8,05 E01a2901958bHarmonia Mundi  a3149020195840  a20140613d2007    m  y0frea0103    ba      aax  hx       cd                         1 aSymphonies 38 \"Prague\" & 41 \"Jupiter\"bCDfWolfgang Amadeus Mozart, compos.gRené Jacobs, dir.gFreiburger Barockorchester, orch. 1cHarmonia Mundid2012 1a1 CD (68 min)e1 livret  aEnregistrement de 2007.  b3149020195840cCD  tSymphonii nع38 en ré majeur, k504 'prague' : adagio, allegro  tSymphonie nع38 en ré majeur, k504 'prague' : andante  tSymphonie n°38 en ré majeur, k504 'prague' : finale, presto  tSymphonie n°41 en ut majeur, k551 'jupiter' : allegro vivace  tSymphonie n°41 en ut majeur, k551 'jupiter' : andante cantabile  tSymphonie n°41 en ut majeur, k551 'jupiter' : menuetto, allegretto, trio  tSymphonie n°41 en ut majeur, k551 'jupiter' : molto allegro  aMusique - 18e siècleyAutriche  a3.24tSymphonie, poème symphonique2PCDM4 1aMozartbWolfgang Amadeusf1756-179142306Compositeur 1aJacobsbRenéf1946-....4qco6chef d'orchestre 1aFreiburger Barockorchester4ost6orchestre à cordes 1aFRbCVSc201406134 zSymphonie nع38 en ré majeur, k504 'prague' : adagio, allegro4 zSymphonie nع38 en ré majeur, k504 'prague' : andante4 zSymphonie nع38 en ré majeur, k504 'prague' : finale, presto4 zSymphonie nع41 en ut majeur, k551 'jupiter' : allegro vivace4 zSymphonie nع41 en ut majeur, k551 'jupiter' : andante cantabile4 zSymphonie nع41 en ut majeur, k551 'jupiter' : menuetto, allegretto, trio4 zSymphonie nع41 en ut majeur, k551 'jupiter' : molto allegro  uhttp://ecx.images-amazon.com/images/I/51nXuj1YJPL._SL160_.jpgvhttp://ecx.images-amazon.com/images/I/51nXuj1YJPL.jpg",
+																 'z3950_retry' => 0,
+																 'nb_visu' => 0,
+																 'nb_resa' => 0,
+																 'url_vignette' => '',
+																 'url_image' => '']);
+
+		$this->_mock_sql
+			->whenCalled('fetchEnreg')
+			->with('select * from int_bib where id_bib=1')
+			->answers(['id' => 1,
+								 'qualite' => 5]);
+
+
+		$this->_mock_sql
+			->whenCalled('fetchEnreg')
+			->with('select qualite,unimarc,facettes from notices where id_notice=1')
+			->answers($symphonie->toArray());
+
+
+    $this->loadNotice('unimarc_symphonie');
+	}
+
+
+	/** @test */
+	public function degreeShouldStayUTF8Degree() {
+		$this->assertContains('n°', Class_Notice::find(1)->get_subfield(464, 't')[0]);
+	}
+}
+
+
+
+/** @see http://forge.afi-sa.fr/issues/16628 */
+class NanookRecordsIntegrationInterestEsperluetteTest extends NanookRecordsIntegrationTestCase {
+	public function setUp() {
+		parent::setUp();
+
+		$this->_mock_sql
+			->whenCalled('fetchEnreg')
+			->with('select * from int_bib where id_bib=1')
+			->answers(['id' => 1,
+								 'qualite' => 5,
+								 'sigb' => 13]);
+		$this->loadNotice('unimarc_esperluette_2014');
+		$this->loadNotice('unimarc_esperluette_2014');
+		$this->notice = Class_Notice::find(1);
+	}
+
+
+	/** @test */
+	public function deweyShouldContainsEsperluette() {
+		$this->assertEquals('ESPERLUETTE ESPERLUET 2014', $this->notice->getDewey());
+	}
+}
+
+
+
+class NanookRecordsIntegrationAuxAnimauxLaGuerreTest extends NanookRecordsIntegrationTestCase {
+	public function setUp() {
+		parent::setUp();
+		$this->loadNotice('unimarc_aux_animaux_la_guerre');
+		$this->loadNotice('unimarc_aux_animaux_la_guerre');
+	}
+
+
+	/** @test */
+	public function noticeAuxAnimauxLaGuerreCallNumberShouldNotBeEmpty() {
+		$notice = Class_Notice::find(1);
+		$this->assertEquals('RP MATH', $notice->getCote());
+	}
+}
+
+
+
+class NanookRecordsIntegrationUpdateNoticeTest extends NoticeIntegrationTestCase {
+	protected $_profil_donnees = ['id_profil' => 150,
+																'id' => 150,
+																'libelle' => 'Unimarc Nanook plop',
+																'accents' => '0',
+																'rejet_periodiques' =>  '1',
+																'id_article_periodique' => '1',
+																'type_fichier' => '0',
+																'format' => '0',
+																'attributs' => 'a:7:{i:0;a:8:{s:8:"type_doc";a:26:{i:0;a:3:{s:4:"code";s:1:"0";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:1;a:3:{s:4:"code";s:1:"1";s:5:"label";s:2:"am";s:8:"zone_995";s:0:"";}i:2;a:3:{s:4:"code";s:1:"2";s:5:"label";s:2:"as";s:8:"zone_995";s:0:"";}i:3;a:3:{s:4:"code";s:1:"3";s:5:"label";s:0:"";s:8:"zone_995";s:2:"jz";}i:4;a:3:{s:4:"code";s:1:"4";s:5:"label";s:4:"g;gm";s:8:"zone_995";s:0:"";}i:5;a:3:{s:4:"code";s:1:"5";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:6;a:3:{s:4:"code";s:1:"8";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:7;a:3:{s:4:"code";s:1:"9";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:8;a:3:{s:4:"code";s:2:"10";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:9;a:3:{s:4:"code";s:2:"11";s:5:"label";s:0:"";s:8:"zone_995";s:2:"xz";}i:10;a:3:{s:4:"code";s:2:"12";s:5:"label";s:0:"";s:8:"zone_995";s:2:"kk";}i:11;a:3:{s:4:"code";s:2:"13";s:5:"label";s:0:"";s:8:"zone_995";s:2:"me";}i:12;a:3:{s:4:"code";s:2:"14";s:5:"label";s:0:"";s:8:"zone_995";s:2:"iz";}i:13;a:3:{s:4:"code";s:2:"15";s:5:"label";s:0:"";s:8:"zone_995";s:2:"mz";}i:14;a:3:{s:4:"code";s:3:"100";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:15;a:3:{s:4:"code";s:3:"101";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:16;a:3:{s:4:"code";s:3:"102";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:17;a:3:{s:4:"code";s:3:"103";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:18;a:3:{s:4:"code";s:3:"104";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:19;a:3:{s:4:"code";s:3:"105";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:20;a:3:{s:4:"code";s:3:"106";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:21;a:3:{s:4:"code";s:3:"107";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:22;a:3:{s:4:"code";s:3:"108";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:23;a:3:{s:4:"code";s:3:"109";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:24;a:3:{s:4:"code";s:3:"111";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:25;a:3:{s:4:"code";s:3:"110";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}}s:17:"champ_code_barres";s:1:"f";s:10:"champ_cote";s:1:"k";s:14:"champ_type_doc";s:0:"";s:11:"champ_genre";s:1:"7";s:13:"champ_section";s:1:"9";s:17:"champ_emplacement";s:1:"6";s:12:"champ_annexe";s:1:"8";}i:1;a:1:{s:6:"champs";s:0:"";}i:2;a:1:{s:6:"champs";s:0:"";}i:3;a:1:{s:6:"champs";s:0:"";}i:5;a:3:{s:6:"champs";s:0:"";s:17:"xml_balise_abonne";s:0:"";s:17:"xml_champs_abonne";a:22:{s:6:"IDABON";s:0:"";s:9:"ORDREABON";s:0:"";s:3:"NOM";s:0:"";s:6:"PRENOM";s:0:"";s:9:"NAISSANCE";s:0:"";s:8:"PASSWORD";s:0:"";s:4:"MAIL";s:0:"";s:10:"DATE_DEBUT";s:0:"";s:8:"DATE_FIN";s:0:"";s:7:"ID_SIGB";s:0:"";s:7:"_IDABON";s:0:"";s:10:"_ORDREABON";s:0:"";s:4:"_NOM";s:0:"";s:7:"_PRENOM";s:0:"";s:10:"_NAISSANCE";s:0:"";s:9:"_PASSWORD";s:0:"";s:5:"_MAIL";s:0:"";s:11:"_DATE_DEBUT";s:0:"";s:9:"_DATE_FIN";s:0:"";s:8:"_ID_SIGB";s:0:"";s:10:"_NUM_CARTE";s:0:"";s:5:"_NULL";s:0:"";}}i:4;a:5:{s:4:"zone";s:3:"995";s:5:"champ";s:1:"4";s:6:"format";s:1:"1";s:5:"jours";s:0:"";s:7:"valeurs";s:0:"";}i:6;a:2:{s:4:"zone";s:0:"";s:5:"champ";s:0:"";}}'
+	];
+
+	public function setUp() {
+		parent::setUp();
+
+		$profil_donnees_1 = $this->fixture('Class_IntProfilDonnees', [
+                                                                  'id_profil' => 1,
+                                                                  'id' => 1,
+                                                                  'libelle' => 'Unimarc Standard',
+                                                                  'accents' => '1',
+                                                                  'rejet_periodiques' =>  '1',
+                                                                  'id_article_periodique' => '0',
+                                                                  'type_fichier' => '0',
+                                                                  'format' => '0',
+                                                                  'attributs' => 'a:7:{i:0;a:8:{s:8:"type_doc";a:26:{i:0;a:3:{s:4:"code";s:1:"0";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:1;a:3:{s:4:"code";s:1:"1";s:5:"label";s:5:"am;na";s:8:"zone_995";s:0:"";}i:2;a:3:{s:4:"code";s:1:"2";s:5:"label";s:2:"as";s:8:"zone_995";s:0:"";}i:3;a:3:{s:4:"code";s:1:"3";s:5:"label";s:3:"i;j";s:8:"zone_995";s:0:"";}i:4;a:3:{s:4:"code";s:1:"4";s:5:"label";s:1:"g";s:8:"zone_995";s:0:"";}i:5;a:3:{s:4:"code";s:1:"5";s:5:"label";s:3:"l;m";s:8:"zone_995";s:0:"";}i:6;a:3:{s:4:"code";s:1:"8";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:7;a:3:{s:4:"code";s:1:"9";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:8;a:3:{s:4:"code";s:2:"10";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:9;a:3:{s:4:"code";s:2:"11";s:5:"label";s:0:"";s:8:"zone_995";s:2:"xz";}i:10;a:3:{s:4:"code";s:2:"12";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:11;a:3:{s:4:"code";s:2:"13";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:12;a:3:{s:4:"code";s:2:"14";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:13;a:3:{s:4:"code";s:2:"15";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:14;a:3:{s:4:"code";s:3:"100";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:15;a:3:{s:4:"code";s:3:"101";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:16;a:3:{s:4:"code";s:3:"102";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:17;a:3:{s:4:"code";s:3:"103";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:18;a:3:{s:4:"code";s:3:"104";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:19;a:3:{s:4:"code";s:3:"105";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:20;a:3:{s:4:"code";s:3:"106";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:21;a:3:{s:4:"code";s:3:"107";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:22;a:3:{s:4:"code";s:3:"108";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:23;a:3:{s:4:"code";s:3:"109";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:24;a:3:{s:4:"code";s:3:"111";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:25;a:3:{s:4:"code";s:3:"110";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}}s:17:"champ_code_barres";s:1:"f";s:10:"champ_cote";s:1:"k";s:14:"champ_type_doc";s:0:"";s:11:"champ_genre";s:0:"";s:13:"champ_section";s:1:"q";s:17:"champ_emplacement";s:1:"u";s:12:"champ_annexe";s:1:"a";}i:1;a:1:{s:6:"champs";s:0:"";}i:2;a:1:{s:6:"champs";s:0:"";}i:3;a:1:{s:6:"champs";s:0:"";}i:5;a:3:{s:6:"champs";s:0:"";s:17:"xml_balise_abonne";s:0:"";s:17:"xml_champs_abonne";a:22:{s:6:"IDABON";s:0:"";s:9:"ORDREABON";s:0:"";s:3:"NOM";s:0:"";s:6:"PRENOM";s:0:"";s:9:"NAISSANCE";s:0:"";s:8:"PASSWORD";s:0:"";s:4:"MAIL";s:0:"";s:10:"DATE_DEBUT";s:0:"";s:8:"DATE_FIN";s:0:"";s:7:"ID_SIGB";s:0:"";s:7:"_IDABON";s:0:"";s:10:"_ORDREABON";s:0:"";s:4:"_NOM";s:0:"";s:7:"_PRENOM";s:0:"";s:10:"_NAISSANCE";s:0:"";s:9:"_PASSWORD";s:0:"";s:5:"_MAIL";s:0:"";s:11:"_DATE_DEBUT";s:0:"";s:9:"_DATE_FIN";s:0:"";s:8:"_ID_SIGB";s:0:"";s:10:"_NUM_CARTE";s:0:"";s:5:"_NULL";s:0:"";}}i:4;a:5:{s:4:"zone";s:0:"";s:5:"champ";s:0:"";s:6:"format";s:0:"";s:5:"jours";s:0:"";s:7:"valeurs";s:0:"";}i:6;a:2:{s:4:"zone";s:0:"";s:5:"champ";s:0:"";}}'
+                                                                  ]);
+
+		$req_profils = 'select * from profil_donnees where id_profil=1';
+		$this->_mock_sql
+			->whenCalled('fetchEnreg')
+			->with($req_profils)
+			->answers($profil_donnees_1->getRawAttributes())
+
+			->whenCalled('fetchEnreg')
+			->with($req_profils, false)
+			->answers($profil_donnees_1->getRawAttributes());
+
+		Class_CosmoVar::newInstanceWithId('types_docs',
+																			['liste' => "0:non identifié\r\n1:livres\r\n2:périodiques\r\n3:disques\r\n4:DVD\r\n5:cédéroms\r\n8:articles cms\r\n9:fils rss\r\n10:sites internet\r\n15:Liseuse\r\n100:Livre Numérique\r\n101:Diaporamas\r\n102:Type doc\r\n103:OAI\r\n104:Type doc\r\n105:Formation Vodéclic\r\n106:Livres Numériques\r\n107:Vidéos à la demande\r\n108:Tout apprendre\r\n109:Enregistrement audio\r\n110:Numérique Premium"]);
+
+		Class_CosmoVar::newInstanceWithId('nature_docs',
+																			['liste' => '1:Collection\r\n2:Dataset\r\n3:Event\r\n4:Image']);
+	}
+
+	/** @test */
+	public function noticeLiseuseCybookOdyssey4shouldhaveTypeDocQuoi() {
+		$this->loadNotice('unimarc_liseuse_cybook_odyssey_4');
+		$notice = Class_Notice::find(1);
+		$this->assertEquals(15, $notice->getTypeDoc());
+
+		$this->loadNotice('unimarc_liseuse_cybook_odyssey_4');
+		$notice = Class_Notice::find(1);
+		$this->assertEquals(15, $notice->getTypeDoc());
+	}
+}
+
+
+
+class NanookRecordsIntegrationPoorNoticeUpdateTest extends NanookRecordsIntegrationTestCase {
+	public function setUp() {
+		parent::setUp();
+
+		$this->loadNotice('unimarc_la_route_sombre_poor');
+
+		$this->_mock_sql
+			->whenCalled('fetchOne')
+			->with("select id_notice from exemplaires where id_int_bib=1 and  code_barres='L-038374'")
+			->answers(1);
+
+		$this->loadNotice('unimarc_la_route_sombre');
+	}
+
+	/** @test */
+	public function recordShouldBeUpdatedAndHaveAnISBN() {
+		$record = Class_Notice::find(1);
+		$this->assertEquals('978-2-08-130888-6', $record->getIsbn());
+	}
+}
+
+
+
+
+class NanookRecordsIntegrationLeChatonDansLaSouriciereTest extends NanookRecordsIntegrationTestCase {
+	public function setUp() {
+		parent::setUp();
+		$this->loadNotice('unimarc_un_chaton_dans_la_souriciere');
+		$this->_notice = Class_Notice::find(1);
+	}
+
+
+	/** @test */
+	public function titleShouldBeChatonDansLaSouriciere() {
+		$this->assertEquals('Un Chaton dans la souricière - (pastille verte) policier',
+												$this->_notice->getTitrePrincipal());
+	}
+
+
+	/** @test */
+	public function tomeAlphaShouldBeSix() {
+		$this->assertEquals('6', $this->_notice->getTomeAlpha());
+	}
+
+
+	/** @test */
+	public function collectionShouldBeMiniSourisNoire() {
+		$this->assertEquals('Mini souris noire', $this->_notice->getCollections()[0]);
+	}
+
+
+	/** @test */
+	public function noticeShouldNotHaveTomes() {
+		$this->assertEquals([],$this->_notice->getNoticesMemeSeries());
+	}
+
+  /** @test */
+	public function clefChapeauShouldBeMiniSourisNoire() {
+		$this->assertEquals('MINI SOURIS NOIRE', $this->_notice->getClefChapeau());
+	}
+}
+
+
+
+
+class NanookRecordsIntegrationOblivionTest extends NanookRecordsIntegrationTestCase {
+	public function setUp() {
+		parent::setUp();
+
+		$this->fixture('Class_CodifCentreInteret',
+									 ['id' => 24,
+										'code_alpha' => 'SF   FANTASTIQUE   FANTASY',
+										'libelle' => 'SF']);
+
+		$this->fixture('Class_CodifGenre',
+									 ['id' => 96,
+										'libelle' => 'Film',
+										'regles' => '995$7=15']);
+
+		$this->loadNotice('unimarc_oblivion');
+
+		Class_Notice::find(1)
+			->setFacettes('T1 Z3 G23 Z5')
+			->save();
+
+		$this->loadNotice('unimarc_oblivion');
+
+		$this->_notice = Class_Notice::find(1);
+	}
+
+
+	/** @test */
+	public function titleShouldBeOblivion() {
+		$this->assertEquals('Oblivion', $this->_notice->getTitrePrincipal());
+	}
+
+
+	/** @test */
+	public function firstInterestShouldBeSF() {
+		$this->assertEquals('SF / Fantastique / Fantasy', $this->_notice->getCentreInteret()[0]);
+	}
+
+
+	/** @test */
+	public function secondInterestShouldBeAction() {
+		$this->assertEquals('Action', $this->_notice->getCentreInteret()[1]);
+	}
+
+
+	/** @test */
+	public function codifCentreInteretId25LibelleShouldBeAction() {
+		$this->assertEquals('Action', Class_CodifCentreInteret::find(25)->getLibelle());
+	}
+
+	/** @test */
+	public function genreShouldBeFilm() {
+		$genre = $this->_notice->getGenres()[0];
+		$this->assertEquals('Film', $genre->getLibelle());
+	}
+
+
+	/** @test */
+	public function facettesShouldContainsF2andF24() {
+		$this->assertEquals('T4 A1 F24 F25 Lfre G96', $this->_notice->getFacettes());
+	}
+}
+
+
+
+class NanookRecordsIntegrationSerialTopSanteTest extends NanookRecordsIntegrationTestCase {
+	public function setUp() {
+		parent::setUp();
+    $this->loadRecordsFromFile("unimarc_top_sante");
+		$this->notice = Class_Notice::find(1);
+	}
+
+
+	/** @test */
+	public function mainTitleShouldBeTopSante() {
+		$this->assertContains('Top Santé n° 295 - Avril 2015', $this->notice->getTitrePrincipal());
+	}
+
+
+	/** @test */
+	public function noticeShouldHaveFiveArticles() {
+		$this->assertCount(5, $this->notice->getArticlesPeriodique());
+	}
+}
+
+
+
+class NanookRecordsIntegrationSerialDroitDeVivreEnFamilleTest extends NanookRecordsIntegrationTestCase {
+  public function setUp() {
+    parent::setUp();
+
+    $this->fixture('Class_Notice_SerialArticles',
+                   ['id' => 1,
+                    'clef_chapeau' => 'DOSSIERS ET DOCUMENTS DE LA REVUE QUART MONDE',
+                    'clef_numero' => '11',
+                    'clef_article' => 'FRANCE   LE POINT DE',
+                    'clef_unimarc' => '']);
+
+    $this->fixture('Class_Notice_SerialArticles',
+                   ['id' => 1,
+                    'clef_chapeau' => 'DOSSIERS ET DOCUMENTS DE LA REVUE QUART MONDE',
+                    'clef_numero' => '11',
+                    'clef_article' => 'AVANT LA SESSION',
+                    'clef_unimarc' => '3881b668']);
+
+    $this->loadRecordsFromFile("unimarc_droit_famille");
+
+    $this->notice = Class_Notice::find(1);
+  }
+
+
+  public function expectedArticles() {
+    return [
+            ['DOSSIERS ET DOCUMENTS DE LA REVUE QUART MONDE', '11', 'INTRODUCTION', 'ed318fdc'],
+            ['DOSSIERS ET DOCUMENTS DE LA REVUE QUART MONDE', '11', 'AVANT LA SESSION', '3881b668'],
+            ['DOSSIERS ET DOCUMENTS DE LA REVUE QUART MONDE', '11', 'DROIT DE VIVRE EN FA', '413fd1a5'],
+            ['DOSSIERS ET DOCUMENTS DE LA REVUE QUART MONDE', '11', 'IL NE FAUT JAMAIS BA', '526a451f'],
+            ['DOSSIERS ET DOCUMENTS DE LA REVUE QUART MONDE', '11', 'S IL TE PLAIT  NE M ', '494a0239'],
+            ['DOSSIERS ET DOCUMENTS DE LA REVUE QUART MONDE', '11', 'FRANCE   LE POINT DE', 'c8fb7aea'],
+            ['DOSSIERS ET DOCUMENTS DE LA REVUE QUART MONDE', '11', 'AIDE SOCIALE A L ENF', 'b9d85f15'],
+            ['DOSSIERS ET DOCUMENTS DE LA REVUE QUART MONDE', '11', 'BELGIQUE   LA COMMUN', 'e1807e46'],
+            ['DOSSIERS ET DOCUMENTS DE LA REVUE QUART MONDE', '11', 'GRANDE BRETAGNE   VE', 'ebfe3c09'],
+            ['DOSSIERS ET DOCUMENTS DE LA REVUE QUART MONDE', '11', 'FRANCE   UN RAPPORT ', '5d86c571'],
+            ['DOSSIERS ET DOCUMENTS DE LA REVUE QUART MONDE', '11', 'GRANDE BRETAGNE   LE', '88f30ace'],
+            ['DOSSIERS ET DOCUMENTS DE LA REVUE QUART MONDE', '11', 'TROIS REQUETES SOUTE', '511ba1fe'],
+            ['DOSSIERS ET DOCUMENTS DE LA REVUE QUART MONDE', '11', 'JUGE A LA COUR EUROP', 'd46508c0'],
+            ['DOSSIERS ET DOCUMENTS DE LA REVUE QUART MONDE', '11', 'DROIT DE VIVRE EN FA', '5119b42f']];
+  }
+
+
+  /** @test */
+  public function recordDroitFamilleShouldContains14Articles() {
+    $this->assertCount(14, $this->notice->getArticlesPeriodique());
+  }
+
+
+  /** @test */
+  public function databaseShouldContainsOnly14Articles() {
+    $this->assertCount(14, Class_Notice_SerialArticles::findAll());
+  }
+
+
+  /**
+   * @test
+   * @dataProvider expectedArticles
+   */
+  public function droitFamilleArticlesShouldBePresent($clef_chapeau, $clef_numero, $clef_article, $clef_unimarc) {
+    $this->assertNotNull(Class_Notice_SerialArticles::findFirstBy(['clef_chapeau' => $clef_chapeau,
+                                                                   'clef_numero' => $clef_numero,
+                                                                   'clef_article' => $clef_article,
+                                                                   'clef_unimarc' => $clef_unimarc]));
+  }
+}
diff --git a/cosmogramme/tests/php/classes/NoticeIntegrationTest.php b/cosmogramme/tests/php/classes/NoticeIntegrationTest.php
index e0d2510f376e5171cc3bf84509a44afcc8829f71..92eb1b8a2ee0117a16bb4d4e43e4e225d49e12c8 100644
--- a/cosmogramme/tests/php/classes/NoticeIntegrationTest.php
+++ b/cosmogramme/tests/php/classes/NoticeIntegrationTest.php
@@ -144,6 +144,15 @@ abstract class NoticeIntegrationTestCase extends ModelTestCase {
 		$this->notice_integration->traiteFacettes();
 		$this->notice_data = $this->notice_integration->getNotice();
 	}
+
+
+  public function loadRecordsFromFile($filename) {
+    $contents = file_get_contents(dirname(__FILE__) . "/" . $filename . '.txt');
+
+		array_map([$this, 'loadNoticeFromString'],
+							preg_split('/'.chr(30).chr(29).'/', $contents));
+
+  }
 }
 
 
@@ -1556,254 +1565,6 @@ class NoticeIntegrationConcertoSaintSaensTest extends NoticeIntegrationTestCase
 
 
 
-/** @see http://forge.afi-sa.fr/issues/13769 */
-class NoticeIntegrationAvailabilityFacetTest extends NoticeIntegrationTestCase {
-	public function getProfilDonnees() {
-		return Class_IntProfilDonnees::forNanook()
-			->setIdProfil(110)
-			->setAvailabilityField('v')
-			->getRawAttributes();
-	}
-
-
-	public function setUp() {
-		parent::setUp();
-
-		/*
-		 * cf class_unimarc: [[file:../../../php/classes/classe_unimarc.php::$notice%5B"sections"%5D%5B%5D%20%3D%20$exemplaire%5B"section"%5D%3B][item data to record]] ,
-		 * [[file:../../../php/classes/classe_unimarc.php::if%20($champ_availability%20and%20$champ%5B'code'%5D%20%3D%3D%20$champ_availability)%20{][item parse unimarc]]
-		 */
-		$writer = new Class_NoticeUnimarc_Writer();
-		$writer->setNotice(file_get_contents(dirname(__FILE__)."/unimarc_symphonie.txt"));
-		$writer->add_field('995',
-											 '  ',
-											 [
-												['f', '12345'],
-												['v', '1']
-											 ]);
-		$writer->add_field('995',
-											 '  ',
-											 [
-												['f', '12346'],
-												['v', 'ordered']
-											 ]);
-
-		$writer->update();
-
-		$this->loadNoticeFromString($writer->getFullRecord());
-		Class_Notice::find(1)->updateFacetsFromExemplaires();
-
-	}
-
-
-	/** @test */
-	public function firstItemShouldNotBeAvailable() {
-		$this->assertFalse(Class_Exemplaire::find(1)->isDisponible(true));
-	}
-
-
-	/** @test */
-	public function secondItemShouldBeAvailable() {
-		$this->assertTrue(Class_Exemplaire::find(2)->isDisponible(true));
-	}
-
-
-	/** @test */
-	public function thirdItemShouldNotBeAvailable() {
-		$this->assertFalse(Class_Exemplaire::find(3)->isDisponible(true));
-	}
-
-
-  /** @test */
-	public function noticeShouldContainsFacetV1() {
-		$this->assertContains('V1', Class_Notice::find(1)->getFacettes());
-	}
-}
-
-
-
-/** @see http://forge.afi-sa.fr/issues/16358 */
-class NoticeIntegrationSymphonieTest extends NoticeIntegrationTestCase {
-	public function getProfilDonnees() {
-		$profil = Class_IntProfilDonnees::forNanook()->setIdProfil(110);
-		return $profil->getRawAttributes();
-	}
-
-
-	public function setUp() {
-		parent::setUp();
-
-		$symphonie = $this->fixture('Class_Notice',
-																['id' => 1,
-																 'type_doc' => 3,
-																 'alpha_titre' => 'SYMPHONIES 38  PRAGUE    41  JUPITER',
-																 'alpha_auteur' => 'MOZART WOLFGANG AMADEUS',
-																 'titres' => 'SYMPHONIES SINFONI 38  PRAGUE PRAG 41 JUPITER JUPIT',
-																 'auteurs' => 'MOZART MOZAR WOLFGANG OLFGANG AMADEUS AMAD JACOBS JAKOB RENE RAN FREIBURGER FREIBURJ BAROCKORCHESTER BAROKORKEST',
-																 'editeur' => 'Harmonia Mundi',
-																 'collection' => '',
-																 'matieres' => 'MUSIQUE MUSIK 18E  SIECLE SIEKL AUTRICHE OTRICH',
-																 'dewey' => '',
-																 'facettes' => '  A1 A2 A3 M1 T3 B1',
-																 'cote' => '3 MOZ 24',
-																 'isbn' => '',
-																 'ean' => '3149020195840',
-																 'id_commerciale' => 'HARMONIAMUNDI2901958SYMPHONIES38PRAGUE41',
-																 'id_bnf' => '',
-																 'clef_alpha' => 'SYMPHONIES38PRAGUE41JUPITER--MOZARTW--HARMONIAMUNDI-2012-3',
-																 'clef_oeuvre' => 'SYMPHONIES38PRAGUE41JUPITER--MOZARTW-',
-																 'clef_chapeau' => '',
-																 'tome_alpha' => '',
-																 'annee' => 2010,
-																 'qualite' => 5,
-																 'exportable' => 1,
-																 'date_creation' => '2000-01-01 00:00:00',
-																 'date_maj' => '2014-09-16 12:25:58',
-																 'unimarc' => "02135njm0 2200409   450 001000700000010001100007071002800018073001800046100004500064126004500109200013500154210002500289215002800314300002800342345002200370464006700392464005900459464006600518464006600584464006900650464007800719464006500797610003600862686004700898700005800945702005201003702005701055801002201112856006701134856005901201856006601260856006601326856006901392856007801461856006501539992012101604196508  d8,05 E01a2901958bHarmonia Mundi  a3149020195840  a20140613d2007    m  y0frea0103    ba      aax  hx       cd                         1 aSymphonies 38 \"Prague\" & 41 \"Jupiter\"bCDfWolfgang Amadeus Mozart, compos.gRené Jacobs, dir.gFreiburger Barockorchester, orch. 1cHarmonia Mundid2012 1a1 CD (68 min)e1 livret  aEnregistrement de 2007.  b3149020195840cCD  tSymphonii nع38 en ré majeur, k504 'prague' : adagio, allegro  tSymphonie nع38 en ré majeur, k504 'prague' : andante  tSymphonie n°38 en ré majeur, k504 'prague' : finale, presto  tSymphonie n°41 en ut majeur, k551 'jupiter' : allegro vivace  tSymphonie n°41 en ut majeur, k551 'jupiter' : andante cantabile  tSymphonie n°41 en ut majeur, k551 'jupiter' : menuetto, allegretto, trio  tSymphonie n°41 en ut majeur, k551 'jupiter' : molto allegro  aMusique - 18e siècleyAutriche  a3.24tSymphonie, poème symphonique2PCDM4 1aMozartbWolfgang Amadeusf1756-179142306Compositeur 1aJacobsbRenéf1946-....4qco6chef d'orchestre 1aFreiburger Barockorchester4ost6orchestre à cordes 1aFRbCVSc201406134 zSymphonie nع38 en ré majeur, k504 'prague' : adagio, allegro4 zSymphonie nع38 en ré majeur, k504 'prague' : andante4 zSymphonie nع38 en ré majeur, k504 'prague' : finale, presto4 zSymphonie nع41 en ut majeur, k551 'jupiter' : allegro vivace4 zSymphonie nع41 en ut majeur, k551 'jupiter' : andante cantabile4 zSymphonie nع41 en ut majeur, k551 'jupiter' : menuetto, allegretto, trio4 zSymphonie nع41 en ut majeur, k551 'jupiter' : molto allegro  uhttp://ecx.images-amazon.com/images/I/51nXuj1YJPL._SL160_.jpgvhttp://ecx.images-amazon.com/images/I/51nXuj1YJPL.jpg",
-																 'z3950_retry' => 0,
-																 'nb_visu' => 0,
-																 'nb_resa' => 0,
-																 'url_vignette' => '',
-																 'url_image' => '']);
-
-		$this->_mock_sql
-			->whenCalled('fetchEnreg')
-			->with('select * from int_bib where id_bib=1')
-			->answers(['id' => 1,
-								 'qualite' => 5]);
-
-
-		$this->_mock_sql
-			->whenCalled('fetchEnreg')
-			->with('select qualite,unimarc,facettes from notices where id_notice=1')
-			->answers($symphonie->toArray());
-
-
-			$this->loadNotice('unimarc_symphonie');
-	}
-
-
-	/** @test */
-	public function degreeShouldStayUTF8Degree() {
-		$this->assertContains('n°', Class_Notice::find(1)->get_subfield(464, 't')[0]);
-	}
-}
-
-
-
-
-/** @see http://forge.afi-sa.fr/issues/16628 */
-class NoticeIntegrationInterestEsperluetteTest extends NoticeIntegrationTestCase {
-	public function getProfilDonnees() {
-		$profil = Class_IntProfilDonnees::forNanook()->setIdProfil(110);
-		return $profil->getRawAttributes();
-	}
-
-
-	public function setUp() {
-		parent::setUp();
-
-		$this->_mock_sql
-			->whenCalled('fetchEnreg')
-			->with('select * from int_bib where id_bib=1')
-			->answers(['id' => 1,
-								 'qualite' => 5,
-								 'sigb' => 13]);
-		$this->loadNotice('unimarc_esperluette_2014');
-		$this->loadNotice('unimarc_esperluette_2014');
-		$this->notice = Class_Notice::find(1);
-	}
-
-
-	/** @test */
-	public function deweyShouldContainsEsperluette() {
-		$this->assertEquals('ESPERLUETTE ESPERLUET 2014', $this->notice->getDewey());
-	}
-}
-
-
-
-class NoticeIntegrationAuxAnimauxLaGuerreTest extends NoticeIntegrationTestCase {
-	public function getProfilDonnees() {
-		$profil = Class_IntProfilDonnees::forNanook()->setIdProfil(110);
-		return $profil->getRawAttributes();
-	}
-
-
-	public function setUp() {
-		parent::setUp();
-		$this->loadNotice('unimarc_aux_animaux_la_guerre');
-		$this->loadNotice('unimarc_aux_animaux_la_guerre');
-	}
-
-
-	/** @test */
-	public function noticeAuxAnimauxLaGuerreCallNumberShouldNotBeEmpty() {
-		$notice = Class_Notice::find(1);
-		$this->assertEquals('RP MATH', $notice->getCote());
-	}
-}
-
-
-
-class NoticeIntegrationUpdateNoticeTest extends NoticeIntegrationTestCase {
-	protected $_profil_donnees = ['id_profil' => 150,
-																'id' => 150,
-																'libelle' => 'Unimarc Nanook plop',
-																'accents' => '0',
-																'rejet_periodiques' =>  '1',
-																'id_article_periodique' => '1',
-																'type_fichier' => '0',
-																'format' => '0',
-																'attributs' => 'a:7:{i:0;a:8:{s:8:"type_doc";a:26:{i:0;a:3:{s:4:"code";s:1:"0";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:1;a:3:{s:4:"code";s:1:"1";s:5:"label";s:2:"am";s:8:"zone_995";s:0:"";}i:2;a:3:{s:4:"code";s:1:"2";s:5:"label";s:2:"as";s:8:"zone_995";s:0:"";}i:3;a:3:{s:4:"code";s:1:"3";s:5:"label";s:0:"";s:8:"zone_995";s:2:"jz";}i:4;a:3:{s:4:"code";s:1:"4";s:5:"label";s:4:"g;gm";s:8:"zone_995";s:0:"";}i:5;a:3:{s:4:"code";s:1:"5";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:6;a:3:{s:4:"code";s:1:"8";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:7;a:3:{s:4:"code";s:1:"9";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:8;a:3:{s:4:"code";s:2:"10";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:9;a:3:{s:4:"code";s:2:"11";s:5:"label";s:0:"";s:8:"zone_995";s:2:"xz";}i:10;a:3:{s:4:"code";s:2:"12";s:5:"label";s:0:"";s:8:"zone_995";s:2:"kk";}i:11;a:3:{s:4:"code";s:2:"13";s:5:"label";s:0:"";s:8:"zone_995";s:2:"me";}i:12;a:3:{s:4:"code";s:2:"14";s:5:"label";s:0:"";s:8:"zone_995";s:2:"iz";}i:13;a:3:{s:4:"code";s:2:"15";s:5:"label";s:0:"";s:8:"zone_995";s:2:"mz";}i:14;a:3:{s:4:"code";s:3:"100";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:15;a:3:{s:4:"code";s:3:"101";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:16;a:3:{s:4:"code";s:3:"102";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:17;a:3:{s:4:"code";s:3:"103";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:18;a:3:{s:4:"code";s:3:"104";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:19;a:3:{s:4:"code";s:3:"105";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:20;a:3:{s:4:"code";s:3:"106";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:21;a:3:{s:4:"code";s:3:"107";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:22;a:3:{s:4:"code";s:3:"108";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:23;a:3:{s:4:"code";s:3:"109";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:24;a:3:{s:4:"code";s:3:"111";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:25;a:3:{s:4:"code";s:3:"110";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}}s:17:"champ_code_barres";s:1:"f";s:10:"champ_cote";s:1:"k";s:14:"champ_type_doc";s:0:"";s:11:"champ_genre";s:1:"7";s:13:"champ_section";s:1:"9";s:17:"champ_emplacement";s:1:"6";s:12:"champ_annexe";s:1:"8";}i:1;a:1:{s:6:"champs";s:0:"";}i:2;a:1:{s:6:"champs";s:0:"";}i:3;a:1:{s:6:"champs";s:0:"";}i:5;a:3:{s:6:"champs";s:0:"";s:17:"xml_balise_abonne";s:0:"";s:17:"xml_champs_abonne";a:22:{s:6:"IDABON";s:0:"";s:9:"ORDREABON";s:0:"";s:3:"NOM";s:0:"";s:6:"PRENOM";s:0:"";s:9:"NAISSANCE";s:0:"";s:8:"PASSWORD";s:0:"";s:4:"MAIL";s:0:"";s:10:"DATE_DEBUT";s:0:"";s:8:"DATE_FIN";s:0:"";s:7:"ID_SIGB";s:0:"";s:7:"_IDABON";s:0:"";s:10:"_ORDREABON";s:0:"";s:4:"_NOM";s:0:"";s:7:"_PRENOM";s:0:"";s:10:"_NAISSANCE";s:0:"";s:9:"_PASSWORD";s:0:"";s:5:"_MAIL";s:0:"";s:11:"_DATE_DEBUT";s:0:"";s:9:"_DATE_FIN";s:0:"";s:8:"_ID_SIGB";s:0:"";s:10:"_NUM_CARTE";s:0:"";s:5:"_NULL";s:0:"";}}i:4;a:5:{s:4:"zone";s:3:"995";s:5:"champ";s:1:"4";s:6:"format";s:1:"1";s:5:"jours";s:0:"";s:7:"valeurs";s:0:"";}i:6;a:2:{s:4:"zone";s:0:"";s:5:"champ";s:0:"";}}'
-	];
-
-	public function setUp() {
-		parent::setUp();
-
-		$profil_donnees_1 = $this->fixture('Class_IntProfilDonnees', [
-			'id_profil' => 1,
-			'id' => 1,
-			'libelle' => 'Unimarc Standard',
-			'accents' => '1',
-			'rejet_periodiques' =>  '1',
-			'id_article_periodique' => '0',
-			'type_fichier' => '0',
-			'format' => '0',
-			'attributs' => 'a:7:{i:0;a:8:{s:8:"type_doc";a:26:{i:0;a:3:{s:4:"code";s:1:"0";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:1;a:3:{s:4:"code";s:1:"1";s:5:"label";s:5:"am;na";s:8:"zone_995";s:0:"";}i:2;a:3:{s:4:"code";s:1:"2";s:5:"label";s:2:"as";s:8:"zone_995";s:0:"";}i:3;a:3:{s:4:"code";s:1:"3";s:5:"label";s:3:"i;j";s:8:"zone_995";s:0:"";}i:4;a:3:{s:4:"code";s:1:"4";s:5:"label";s:1:"g";s:8:"zone_995";s:0:"";}i:5;a:3:{s:4:"code";s:1:"5";s:5:"label";s:3:"l;m";s:8:"zone_995";s:0:"";}i:6;a:3:{s:4:"code";s:1:"8";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:7;a:3:{s:4:"code";s:1:"9";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:8;a:3:{s:4:"code";s:2:"10";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:9;a:3:{s:4:"code";s:2:"11";s:5:"label";s:0:"";s:8:"zone_995";s:2:"xz";}i:10;a:3:{s:4:"code";s:2:"12";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:11;a:3:{s:4:"code";s:2:"13";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:12;a:3:{s:4:"code";s:2:"14";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:13;a:3:{s:4:"code";s:2:"15";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:14;a:3:{s:4:"code";s:3:"100";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:15;a:3:{s:4:"code";s:3:"101";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:16;a:3:{s:4:"code";s:3:"102";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:17;a:3:{s:4:"code";s:3:"103";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:18;a:3:{s:4:"code";s:3:"104";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:19;a:3:{s:4:"code";s:3:"105";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:20;a:3:{s:4:"code";s:3:"106";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:21;a:3:{s:4:"code";s:3:"107";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:22;a:3:{s:4:"code";s:3:"108";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:23;a:3:{s:4:"code";s:3:"109";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:24;a:3:{s:4:"code";s:3:"111";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}i:25;a:3:{s:4:"code";s:3:"110";s:5:"label";s:0:"";s:8:"zone_995";s:0:"";}}s:17:"champ_code_barres";s:1:"f";s:10:"champ_cote";s:1:"k";s:14:"champ_type_doc";s:0:"";s:11:"champ_genre";s:0:"";s:13:"champ_section";s:1:"q";s:17:"champ_emplacement";s:1:"u";s:12:"champ_annexe";s:1:"a";}i:1;a:1:{s:6:"champs";s:0:"";}i:2;a:1:{s:6:"champs";s:0:"";}i:3;a:1:{s:6:"champs";s:0:"";}i:5;a:3:{s:6:"champs";s:0:"";s:17:"xml_balise_abonne";s:0:"";s:17:"xml_champs_abonne";a:22:{s:6:"IDABON";s:0:"";s:9:"ORDREABON";s:0:"";s:3:"NOM";s:0:"";s:6:"PRENOM";s:0:"";s:9:"NAISSANCE";s:0:"";s:8:"PASSWORD";s:0:"";s:4:"MAIL";s:0:"";s:10:"DATE_DEBUT";s:0:"";s:8:"DATE_FIN";s:0:"";s:7:"ID_SIGB";s:0:"";s:7:"_IDABON";s:0:"";s:10:"_ORDREABON";s:0:"";s:4:"_NOM";s:0:"";s:7:"_PRENOM";s:0:"";s:10:"_NAISSANCE";s:0:"";s:9:"_PASSWORD";s:0:"";s:5:"_MAIL";s:0:"";s:11:"_DATE_DEBUT";s:0:"";s:9:"_DATE_FIN";s:0:"";s:8:"_ID_SIGB";s:0:"";s:10:"_NUM_CARTE";s:0:"";s:5:"_NULL";s:0:"";}}i:4;a:5:{s:4:"zone";s:0:"";s:5:"champ";s:0:"";s:6:"format";s:0:"";s:5:"jours";s:0:"";s:7:"valeurs";s:0:"";}i:6;a:2:{s:4:"zone";s:0:"";s:5:"champ";s:0:"";}}'
-		]);
-
-		$req_profils = 'select * from profil_donnees where id_profil=1';
-		$this->_mock_sql
-			->whenCalled('fetchEnreg')
-			->with($req_profils)
-			->answers($profil_donnees_1->getRawAttributes())
-
-			->whenCalled('fetchEnreg')
-			->with($req_profils, false)
-			->answers($profil_donnees_1->getRawAttributes());
-
-		Class_CosmoVar::newInstanceWithId('types_docs',
-																			['liste' => "0:non identifié\r\n1:livres\r\n2:périodiques\r\n3:disques\r\n4:DVD\r\n5:cédéroms\r\n8:articles cms\r\n9:fils rss\r\n10:sites internet\r\n15:Liseuse\r\n100:Livre Numérique\r\n101:Diaporamas\r\n102:Type doc\r\n103:OAI\r\n104:Type doc\r\n105:Formation Vodéclic\r\n106:Livres Numériques\r\n107:Vidéos à la demande\r\n108:Tout apprendre\r\n109:Enregistrement audio\r\n110:Numérique Premium"]);
-
-		Class_CosmoVar::newInstanceWithId('nature_docs',
-																			['liste' => '1:Collection\r\n2:Dataset\r\n3:Event\r\n4:Image']);
-	}
-
-	/** @test */
-	public function noticeLiseuseCybookOdyssey4shouldhaveTypeDocQuoi() {
-		$this->loadNotice('unimarc_liseuse_cybook_odyssey_4');
-		$notice = Class_Notice::find(1);
-		$this->assertEquals(15, $notice->getTypeDoc());
-
-		$this->loadNotice('unimarc_liseuse_cybook_odyssey_4');
-		$notice = Class_Notice::find(1);
-		$this->assertEquals(15, $notice->getTypeDoc());
-	}
-}
-
-
-
 class NoticeIntegration11septembre2001Test extends NoticeIntegrationTestCase {
 	public function getProfilDonnees() {
 		return Class_IntProfilDonnees::forALOES()
@@ -2051,156 +1812,6 @@ class NoticeIntegrationAloesTest extends NoticeIntegrationTestCase {
 
 
 
-
-class NoticeIntegrationPoorNoticeUpdateTest extends NoticeIntegrationTestCase {
-	public function getProfilDonnees() {
-		return Class_IntProfilDonnees::forNanook()
-			->setIdProfil(111)
-			->getRawAttributes();
-	}
-
-	public function setUp() {
-		parent::setUp();
-
-		$this->loadNotice('unimarc_la_route_sombre_poor');
-
-		$this->_mock_sql
-			->whenCalled('fetchOne')
-			->with("select id_notice from exemplaires where id_int_bib=1 and  code_barres='L-038374'")
-			->answers(1);
-
-		$this->loadNotice('unimarc_la_route_sombre');
-	}
-
-	/** @test */
-	public function recordShouldBeUpdatedAndHaveAnISBN() {
-		$record = Class_Notice::find(1);
-		$this->assertEquals('978-2-08-130888-6', $record->getIsbn());
-	}
-}
-
-
-
-
-class NoticeIntegrationLeChatonDansLaSouriciereTest extends NoticeIntegrationTestCase {
-	public function getProfilDonnees() {
-		$profil = Class_IntProfilDonnees::forNanook()->setIdProfil(110);
-		return $profil->getRawAttributes();
-	}
-
-
-	public function setUp() {
-		parent::setUp();
-		$this->loadNotice('unimarc_un_chaton_dans_la_souriciere');
-		$this->_notice = Class_Notice::find(1);
-	}
-
-
-	/** @test */
-	public function titleShouldBeChatonDansLaSouriciere() {
-		$this->assertEquals('Un Chaton dans la souricière - (pastille verte) policier',
-												$this->_notice->getTitrePrincipal());
-	}
-
-
-	/** @test */
-	public function tomeAlphaShouldBeSix() {
-		$this->assertEquals('6', $this->_notice->getTomeAlpha());
-	}
-
-
-	/** @test */
-	public function collectionShouldBeMiniSourisNoire() {
-		$this->assertEquals('Mini souris noire', $this->_notice->getCollections()[0]);
-	}
-
-
-	/** @test */
-	public function noticeShouldNotHaveTomes() {
-		$this->assertEquals([],$this->_notice->getNoticesMemeSeries());
-	}
-
-		/** @test */
-	public function clefChapeauShouldBeMiniSourisNoire() {
-		$this->assertEquals('MINI SOURIS NOIRE', $this->_notice->getClefChapeau());
-	}
-}
-
-
-
-
-class NoticeIntegrationOblivionTest extends NoticeIntegrationTestCase {
-	public function getProfilDonnees() {
-		return Class_IntProfilDonnees::forNanook()
-			->setIdProfil(110)
-			->getRawAttributes();
-	}
-
-
-	public function setUp() {
-		parent::setUp();
-
-		$this->fixture('Class_CodifCentreInteret',
-									 ['id' => 24,
-										'code_alpha' => 'SF   FANTASTIQUE   FANTASY',
-										'libelle' => 'SF']);
-
-		$this->fixture('Class_CodifGenre',
-									 ['id' => 96,
-										'libelle' => 'Film',
-										'regles' => '995$7=15']);
-
-		$this->loadNotice('unimarc_oblivion');
-
-		Class_Notice::find(1)
-			->setFacettes('T1 Z3 G23 Z5')
-			->save();
-
-		$this->loadNotice('unimarc_oblivion');
-
-		$this->_notice = Class_Notice::find(1);
-	}
-
-
-	/** @test */
-	public function titleShouldBeOblivion() {
-		$this->assertEquals('Oblivion', $this->_notice->getTitrePrincipal());
-	}
-
-
-	/** @test */
-	public function firstInterestShouldBeSF() {
-		$this->assertEquals('SF / Fantastique / Fantasy', $this->_notice->getCentreInteret()[0]);
-	}
-
-
-	/** @test */
-	public function secondInterestShouldBeAction() {
-		$this->assertEquals('Action', $this->_notice->getCentreInteret()[1]);
-	}
-
-
-	/** @test */
-	public function codifCentreInteretId25LibelleShouldBeAction() {
-		$this->assertEquals('Action', Class_CodifCentreInteret::find(25)->getLibelle());
-	}
-
-	/** @test */
-	public function genreShouldBeFilm() {
-		$genre = $this->_notice->getGenres()[0];
-		$this->assertEquals('Film', $genre->getLibelle());
-	}
-
-
-	/** @test */
-	public function facettesShouldContainsF2andF24() {
-		$this->assertEquals('T4 A1 F24 F25 Lfre G96', $this->_notice->getFacettes());
-	}
-}
-
-
-
-
 class NoticeIntegrationPommeDeReinetteTest extends NoticeIntegrationTestCase {
 	protected $_profil_donnees = ['id_profil' => 111,
 																'id' => 111,
@@ -2279,40 +1890,6 @@ class NoticeIntegrationNoNoticeTest extends NoticeIntegrationTestCase {
 
 
 
-
-class NoticeIntegrationSerialTopSanteTest extends NoticeIntegrationTestCase {
-	public function getProfilDonnees() {
-		$profil = Class_IntProfilDonnees::forNanook()->setIdProfil(110);
-		return $profil->getRawAttributes();
-	}
-
-
-	public function setUp() {
-		parent::setUp();
-
-		$contents = file_get_contents(dirname(__FILE__)."/unimarc_top_sante.txt");
-
-		array_map([$this, 'loadNoticeFromString'],
-							preg_split('/'.chr(30).chr(29).'/', $contents));
-
-		$this->notice = Class_Notice::find(1);
-	}
-
-
-	/** @test */
-	public function mainTitleShouldBeTopSante() {
-		$this->assertContains('Top Santé n° 295 - Avril 2015', $this->notice->getTitrePrincipal());
-	}
-
-
-	/** @test */
-	public function noticeShouldHaveFiveArticles() {
-		$this->assertCount(5, $this->notice->getArticlesPeriodique());
-	}
-}
-
-
-
 class NoticeIntegrationAloesSerialIndexpressBellesHistoireTest extends NoticeIntegrationTestCase {
 	public function getProfilDonnees() {
 		return Class_IntProfilDonnees::forALOES()
diff --git a/cosmogramme/tests/php/classes/microbib_delete_items.txt b/cosmogramme/tests/php/classes/microbib_delete_items.txt
new file mode 100644
index 0000000000000000000000000000000000000000..c191e6903016dc373f086faabb79fefc01647784
--- /dev/null
+++ b/cosmogramme/tests/php/classes/microbib_delete_items.txt
@@ -0,0 +1,13 @@
+02Ç9270194    
+0147560194    
+0145870194    
+0145890194    
+0145900194    
+0145910194    
+0307760194    
+0002450021    
+0002430021    
+0190610194    
+0313010194    
+0313000194    
+0243170194    
diff --git a/cosmogramme/tests/php/classes/unimarc_droit_famille.txt b/cosmogramme/tests/php/classes/unimarc_droit_famille.txt
new file mode 100644
index 0000000000000000000000000000000000000000..acda57222385ff35f16018eb48b8c50261eef393
--- /dev/null
+++ b/cosmogramme/tests/php/classes/unimarc_droit_famille.txt
@@ -0,0 +1 @@
+03003nas2 2200217   450 0010005000000100018000051000013000232000110000362100041001462150018001873302013002054100057022184610059022757000020023348010017023549320012023719930014023839950150023979950119025479950119026661256  a2-913046-24-X  a201505221 aLe droit de vivre en familleeDialogue entre professionnels et familles en situation de grande pauvreté.  a[Paris]cÉditions Quart Monded2003  d30 cma248 p.  aActes de la session "Justice et Quart Monde", des 4 et 5 mai 2001, organisée à l'initiative du Mouvement ATD Quart Monde, entre professionnels de la protection de l'enfance et des parents en situation de grande pauvreté dont les enfants sont placés.Tous les parents ont les mêmes aspirations, mais les conditions de vie des plus pauvres les empêchent le plus souvent de bâtir le projet familial dont ils rêvent. Beaucoup vivent dans la crainte du placement de leurs enfants. Avec eux, le Mouvement ATD Quart Monde s'efforce de trouver les moyens de rendre effectif le droit de vivre en famille, rejoignant en cela les préoccupations de nombreux professionnels.  " Le placement n'intervient-il que quand toutes les solutions moins traumatisantes ont été recherchées et essayées ? Les solutions existantes sont-elles suffisamment nombreuses et diversifiées pour faire face aux difficultés que rencontrent les familles ? Quand le placement a lieu, tous les efforts sont-ils faits pour y mettre fin ? Comment faire évoluer les procédures pour associer les parents et faire entendre leur point de vue dans les décisions concernant leurs enfants ? Comment la question du droit de vivre en famille est-elle prise en compte en Belgique, en Grande-Bretagne et en France ? Quelle est la contribution de la Cour européenne des droits de l'homme ? "  Telles sont quelques unes des questions ayant nourri les débats qui ont eu lieu les 4 et 5 mai 2001, à l'initiative du Mouvement ATD Quart Monde, entre des professionnels de la protection de l'enfance et des parents en situation de grande pauvreté dont les enfants sont placés. Venant de France, de Belgique, de Grande-Bretagne, de Suisse et du Luxembourg, ils se sont rencontrés à l'Ecole nationale de la magistrature à Paris, pour échanger leur expérience.  Cette démarche exceptionnelle de dialogue et de réflexion commune, et les apports qui en résultent, ne peuvent que susciter un nouveau regard et inspirer des pratiques nouvelles. 0tDossiers et documents de la Revue Quart Monde n° 11  tDossiers et documents de la revue Quart Mondev110830 1aATD Quart Monde 2aFrc20150902  aFamille  43aAdulte  aATD MontreuilfATD1-00821kPc 2003 01Cm20150902qurpzppocv12[CSP][A consulter sur place][0][0][A consulter sur place][0][0][1][0]7108193  aATD MontreuilfATD1-00822kPc 2003 01P1m20150902qurpzppopv12[DIS][Disponible][0][1][][0][0][0][0]7108193  aATD MontreuilfATD1-00823kPc 2003 01P2m20150902qurpzppopv12[DIS][Disponible][0][1][][0][0][0][0]710819300176naa2 2200073   450 00100050000020000170000546100540002270000260007612601 aIntroduction  tDossiers et documents de la revue Quart Mondev11 1aMarie-Cécile Renoux00177naa2 2200073   450 00100050000020000210000546100540002670000230008012621 aAvant la session  tDossiers et documents de la revue Quart Mondev11 1aBrigitte Bourcier00191naa2 2200073   450 00100050000020000330000546100540003870000250009212591 aLe droit de vivre en famille  tDossiers et documents de la revue Quart Mondev11 1aGeorges De Kerchove00194naa2 2200073   450 00100050000020000390000546100540004470000220009812611 aIl ne faut jamais baisser les bras  tDossiers et documents de la revue Quart Mondev11 1aPauline Mulligan00182naa2 2200073   450 00100050000020000340000546100540003970000150009312651 aS'il te plaît, ne m'aide pas  tDossiers et documents de la revue Quart Mondev11 1aGuy Hardy00208naa2 2200073   450 00100050000020000530000546100540005870000220011212641 aFrance : le point de vue d’un juge des enfants  tDossiers et documents de la revue Quart Mondev11 1aMarcel Klajnberg00232naa2 2200073   450 00100050000020000690000546100540007470000300012812691 aAide sociale à l’enfance : une charte éthique à la Réunion  tDossiers et documents de la revue Quart Mondev11 1aGisèle Contrain Etrayen00223naa2 2200073   450 00100050000020000590000546100540006470000310011812581 aBelgique : La Communauté française et les placements  tDossiers et documents de la revue Quart Mondev11 1aDanièle Delatte Gévaert00217naa2 2200073   450 00100050000020000640000546100540006970000200012312571 aGrande Bretagne : vers une réelle implication des familles  tDossiers et documents de la revue Quart Mondev11 1aRob Hutchinson00212naa2 2200073   450 00100050000020000420000546100540004770000370010112631 aFrance : un rapport interministériel  tDossiers et documents de la revue Quart Mondev11 1aPierre Naves Et Bruno Cathala00261naa2 2200073   450 00100050000020001110000546100540011670000170017012701 aGrande Bretagne : le combat d’un père de famille jusqu’à la Cour européenne des droits de l’homme  tDossiers et documents de la revue Quart Mondev11 1aDerek Asker00242naa2 2200073   450 00100050000020000910000546100540009670000180015012671 aTrois requêtes soutenues par ATD Quart Monde devant la Cour européenne de Strasbourg  tDossiers et documents de la revue Quart Mondev11 1aHenri Bossan00204naa2 2200073   450 00100050000020000470000546100540005270000240010612681 aUn juge à la Cour européenne s’exprime  tDossiers et documents de la revue Quart Mondev11 1aFrançoise Tulkens00231naa2 2200073   450 00100050000020000810000546100540008670000170014012661 aLe droit de vivre en famille c'est le droit de vivre en dignitéeConclusion  tDossiers et documents de la revue Quart Mondev11 1aPaul Bouchet
\ No newline at end of file
diff --git a/library/Class/Catalogue.php b/library/Class/Catalogue.php
index 98082e25cfc8ec8015a32afaf22680835eb5970a..79f20e0e498f47c0ec89add004c3d1527de13262 100644
--- a/library/Class/Catalogue.php
+++ b/library/Class/Catalogue.php
@@ -537,6 +537,13 @@ class CatalogueLoader extends Storm_Model_Loader {
 
     return $thesaurus;
   }
+
+
+  public function getIds($domains) {
+    return (new Storm_Model_Collection($domains))
+      ->collect('id')
+      ->getArrayCopy();
+  }
 }
 
 
diff --git a/library/Class/Cosmogramme/FileParser.php b/library/Class/Cosmogramme/FileParser.php
index a3988eb74cc00520e89311da194740ce9545f68b..8f6b818d7f665cf81d7af5a30e76df1de8635e1d 100644
--- a/library/Class/Cosmogramme/FileParser.php
+++ b/library/Class/Cosmogramme/FileParser.php
@@ -42,7 +42,7 @@ abstract class Class_Cosmogramme_FileParser {
      self::FORMAT_CSV => 'Csv',
      self::FORMAT_MARC21 => 'Marc'];
 
-  protected $_file_handle, $_position, $_file_size;
+  protected $_file_handle, $_position, $_file_size, $_profil;
   protected $_errors = [];
 
 
@@ -69,7 +69,7 @@ abstract class Class_Cosmogramme_FileParser {
 
     $this->_buffer = '';
     $this->_file_size = $fileSystem->filesize($file);
-
+    $this->_profil = $profil;
     return true;
   }
 
@@ -158,6 +158,14 @@ abstract class Class_Cosmogramme_FileParser_Ascii extends Class_Cosmogramme_File
     $fileSystem = $this->getFileSystem();
     $data = trim($fileSystem->fgets($this->_file_handle));
     $data = str_getcsv($data, $this->_separator);
+
+    $decoder = new Class_NoticeUnimarc_Writer();
+
+    foreach($data as $index => $value) {
+      $data[$index] = $decoder->decode_accents($value,
+                                               $this->_profil->getAccents());
+    }
+
     $this->_position = $fileSystem->ftell($this->_file_handle);
 
     $ret = new Class_Cosmogramme_FileParser_Record($data);
diff --git a/library/Class/Formulaire.php b/library/Class/Formulaire.php
index 0cfa02e9b139dc1d4666165a8002c6820ed0fe7d..e0b5256485f9436d80adf50285ad6fe8f35745b9 100644
--- a/library/Class/Formulaire.php
+++ b/library/Class/Formulaire.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
  */
 
 class FormulaireLoader extends Storm_Model_Loader {
@@ -34,7 +34,7 @@ class Class_Formulaire extends Storm_Model_Abstract {
   protected $_table_name='formulaires';
   protected $_belongs_to =  ['user' => ['model' => 'Class_Users',
                                         'referenced_in' => 'id_user'],
-                            
+
                              'moderateur' => ['model' => 'Class_Users',
                                               'referenced_in' => 'id_user_moderateur'],
 
@@ -51,18 +51,18 @@ class Class_Formulaire extends Storm_Model_Abstract {
     foreach($formulaires as $formulaire) {
       $names=array_merge($names,$formulaire->getDataNames());
     }
-    
+
     return array_unique($names);
   }
 
-  
+
   /*
    * @return ZendAfi_Mail
    */
   public function getMail() {
     return unserialize($this->getMailAnswer());
   }
-  
+
 
   public function getMailDate() {
     return $this->getMail()->getDate();
@@ -94,20 +94,20 @@ class Class_Formulaire extends Storm_Model_Abstract {
 
   public function getDataNames() {
     return array_keys(array_change_key_case($this->getDatas()));
-    
+
   }
 
 
   public function getDatas() {
-    return isset($_datas) 
-    ? $this->_datas 
-    : $this->_datas = unserialize(parent::_get('data'));
+    return isset($_datas)
+      ? $this->_datas
+      : $this->_datas = unserialize(parent::_get('data'));
   }
 
 
   public function getDataNamed($name) {
     $datas = array_change_key_case($this->getDatas());
-    return isset($datas[$name])?$datas[$name]:'' ;
+    return isset($datas[$name]) ? $datas[$name] : '' ;
   }
 
 
@@ -120,7 +120,7 @@ class Class_Formulaire extends Storm_Model_Abstract {
       $attribute=strtolower($attribute);
       if (!isset($datas[$attribute]))
         $attribute = str_replace('_', '-', $attribute);
-        
+
       return isset($datas[$attribute])?$datas[$attribute]:'' ;
     }
   }
@@ -149,10 +149,10 @@ class Class_Formulaire extends Storm_Model_Abstract {
 
   public function attributeValues($attributes) {
     return array_map(
-      function($attribute) {
-        return $this->callGetterByAttributeName($attribute);
-      },
-      $attributes);
+                     function($attribute) {
+                       return $this->callGetterByAttributeName($attribute);
+                     },
+                     $attributes);
   }
 
 
@@ -164,6 +164,4 @@ class Class_Formulaire extends Storm_Model_Abstract {
   public function beValidated() {
     return $this->setValidated(true);
   }
-
-
 }
diff --git a/library/Class/Notice.php b/library/Class/Notice.php
index 0d199516e3db09cb8a75ec98d3f0a6479f304f3a..117ff12aa19fc51aff5205927c380e3c10cf8492 100644
--- a/library/Class/Notice.php
+++ b/library/Class/Notice.php
@@ -143,10 +143,7 @@ class Class_Notice extends Storm_Model_Abstract {
   protected $_notice_unimarc;
   protected $_has_many = ['exemplaires' => ['model' => 'Class_Exemplaire',
                                             'role' => 'notice',
-                                            'dependents' => 'delete'],
-                          'notice_domain' => ['model' => 'Class_NoticeDomain',
-                                              'role' => 'domain',
-                                              'dependents' => 'delete']];
+                                            'dependents' => 'delete']];
 
   protected
     $_titre_principal,
diff --git a/library/Class/NoticeDomain.php b/library/Class/NoticeDomain.php
index 383b1976bd8541879ff617d9103a158513cf3d05..5d2f5bffa138311af7e40258ae791f075cb7d4b8 100644
--- a/library/Class/NoticeDomain.php
+++ b/library/Class/NoticeDomain.php
@@ -29,13 +29,9 @@ class NoticeDomainLoader extends Storm_Model_Loader {
     }
 
     $all_domain_ids =  array_filter(array_unique($all_domain_ids));
-
-    $domains = [];
-    foreach ($all_domain_ids as $id) {
-      $domains[] = Class_Catalogue::find($id);
-    }
-    return $domains;
-
+    return $all_domain_ids
+      ? Class_Catalogue::findAllBy(['id_catalogue' => $all_domain_ids])
+      : [];
   }
 
   public function getClesNoticesForDomain($domain_id) {
diff --git a/library/Class/NoticeUnimarc/Writer.php b/library/Class/NoticeUnimarc/Writer.php
index daebecdb3b01c924bef9faa7646326979a8102b3..7cb0544ddd34cc6e86bf4f77cfad7da81188d38f 100644
--- a/library/Class/NoticeUnimarc/Writer.php
+++ b/library/Class/NoticeUnimarc/Writer.php
@@ -261,7 +261,7 @@ class Class_NoticeUnimarc_Writer extends Class_NoticeUnimarc {
       $this->inner_data[$label] = [];
       foreach($contents as $content) {
         $new_content = ($this->type_accents > 0)
-          ? $this->decode_accents($content)
+          ? $this->decode_accents($content, $this->type_accents)
           : $content;
 
         if ($export_accents == 1) $new_content = $this->ISO_encode($content);
@@ -367,13 +367,13 @@ class Class_NoticeUnimarc_Writer extends Class_NoticeUnimarc {
   }
 
 
-  public function decode_accents($chaine) {
-    switch ($this->type_accents) {
-      case 0: return $chaine;                         // Utf8
-      case 1: return $this->ISO_decode($chaine);      // Iso standard
-      case 2: return $this->ansi_decode($chaine);     // Windows
-      case 4: return $this->marc21_decode($chaine);   // marc21
-      default: return $chaine;
+  public function decode_accents($chaine, $type_accents) {
+    switch ($type_accents) {
+    case Class_IntProfilDonnees::ENCODING_UTF8: return $chaine;
+    case Class_IntProfilDonnees::ENCODING_ISO2709: return $this->ISO_decode($chaine);
+    case Class_IntProfilDonnees::ENCODING_WINDOWS_ANSI: return $this->ansi_decode($chaine);
+    case Class_IntProfilDonnees::ENCODING_MARC21: return $this->marc21_decode($chaine);
+    default: return $chaine;
     }
   }
 
diff --git a/library/Trait/HasManyDomaines.php b/library/Trait/HasManyDomaines.php
index 1d74ef8edee3fa1f06022700c18afa52aba245fa..879feab62ce5204b78a6d5058e0399b2bfe0a84e 100644
--- a/library/Trait/HasManyDomaines.php
+++ b/library/Trait/HasManyDomaines.php
@@ -31,17 +31,14 @@ trait Trait_HasManyDomaines {
 
   public function getDomaineIdsAsArray() {
     $domaines = $this->_get('domaine_ids') ;
-    return array_filter(explode(';',$domaines));
+    return array_filter(explode(';', $domaines));
   }
 
 
   public function getDomaines() {
-    $ids = $this->getDomaineIdsAsArray();
-    $domaines = [];
-    foreach ($ids as $id) {
-      $domaines[] = Class_Catalogue::find($id);
-    }
-    return $domaines;
+    return empty($domains = $this->getDomaineIdsAsArray())
+      ? []
+      : Class_Catalogue::findAllBy(['id_catalogue' => $domains]);
   }
 
 
diff --git a/library/Trait/Indexable.php b/library/Trait/Indexable.php
index 5d35e0f6b8724b50f24c618c230f52e8c7a3e997..9c82a8644040bfd8a03829e4e48e0be6c19aa9af 100644
--- a/library/Trait/Indexable.php
+++ b/library/Trait/Indexable.php
@@ -30,15 +30,19 @@ trait Trait_Indexable {
 
 
   protected function indexIntoDomain() {
-    if(!$domains_ids = $this->getDomaineIdsAsArray())
-       return $this;
-
     if(!$alpha_key = $this->getAlphaKey()) {
       return $this;
     }
 
+    $domains_ids = Class_Catalogue::getIds($this->getDomaines());
+
     $existing = Class_NoticeDomain::findAllBy(['record_alpha_key' => $alpha_key]);
-    $existing_ids = array_map(function ($item) { return $item->getDomainId();}, $existing);
+
+    $existing_domains = array_filter(array_map(function ($item) {
+                                                                   return $item->getDomain();
+                                                                 }, $existing));
+
+    $existing_ids = array_map(function ($item) { return $item->getId();}, $existing_domains);
 
     if ($to_delete = array_diff($existing_ids, $domains_ids))
       Class_NoticeDomain::deleteBy(['record_alpha_key' => $alpha_key,
@@ -56,6 +60,8 @@ trait Trait_Indexable {
     foreach(Class_NoticeDomain::findAllBy(['record_alpha_key' => $alpha_key]) as $notice_domain)
       $notice_domain->updateFacette();
 
+    $this->setDomaineIds($domains_ids)->save();
+
     return $this;
   }
 
@@ -68,16 +74,16 @@ trait Trait_Indexable {
   public function unindex() {
     $alpha_key = $this->getAlphaKey();
 
-    $domains = $this->getDomaines();
-    if (empty($domains)) {
+    $domains_ids = Class_Catalogue::getIds($this->getDomaines());
+    if (empty($domains_ids)) {
       Class_NoticeDomain::deleteBy(['record_alpha_key' => $alpha_key,
                                     'panier_id' => 0]);
     }
 
-    $domains_in_db = Class_NoticeDomain::getDomainsForRecordAlphaKey($alpha_key);
+    $domains_in_db_ids = Class_Catalogue::getIds(Class_NoticeDomain::getDomainsForRecordAlphaKey($alpha_key));
 
-    foreach(array_diff($domains_in_db, $domains) as $domain)
-      Class_NoticeDomain::deleteBy(['domain_id' => $domain->getId()]);
+    if ($to_delete = array_diff($domains_in_db_ids, $domains_ids))
+      Class_NoticeDomain::deleteBy(['domain_id' => $to_delete]);
   }
 
 
diff --git a/library/ZendAfi/View/Helper/Notice/Exemplaires.php b/library/ZendAfi/View/Helper/Notice/Exemplaires.php
index 187773b969d557fa7dcd79dd5f253ab9a863630b..0718501ce063dd83e27d4cc5151c9a4217ef8605 100644
--- a/library/ZendAfi/View/Helper/Notice/Exemplaires.php
+++ b/library/ZendAfi/View/Helper/Notice/Exemplaires.php
@@ -120,28 +120,12 @@ class ZendAfi_View_Helper_Notice_Exemplaires extends ZendAfi_View_Helper_BaseHel
   }
 
 
-  public function renderLocalizationMap() {
-    return
-      $this->_tag('div', '',
-                  ['id' => 'plan_localisation', 'style' => 'display:none'])
-
-      . $this->_tag('div', $this->view->tagImg('',
-                                               ['alt' => $this->_('Localisation')]),
-                    ['id' => 'point_localisation',
-                     'style' => 'position:absolute;z-index:10000;display:none;cursor:pointer'])
-
-      . $this->_tag('div', '',
-                    ['id' => 'bulle_localisation', 'style' => 'display:none']);
-  }
-
-
   public function render($exemplaires, $preferences, $nb_notices_oeuvre, $aff) {
     return
       $this->_fonctionsAdmin()
       . $this->renderExemplairesTable($exemplaires, $preferences, $aff)
       . $this->renderSameWorkLink($nb_notices_oeuvre,
-                                  array_values($exemplaires)[0]['id_notice'])
-      . $this->renderLocalizationMap();
+                                  array_values($exemplaires)[0]['id_notice']);
   }
 
 
diff --git a/library/storm b/library/storm
index 59632fdd95aedf4eb58e9c0b571ef33c59c9f2aa..e8b3587ac7dd17e67ce4d968cc7d3e1c1b9a1d5d 160000
--- a/library/storm
+++ b/library/storm
@@ -1 +1 @@
-Subproject commit 59632fdd95aedf4eb58e9c0b571ef33c59c9f2aa
+Subproject commit e8b3587ac7dd17e67ce4d968cc7d3e1c1b9a1d5d
diff --git a/public/admin/js/notification/js/jquery_notification_v.1.js b/public/admin/js/notification/js/jquery_notification_v.1.js
index 2370b89781c0ddd4c459eb3893604a39704fc193..b21158a1230317bbfc1fa33c6bdf62d2659e9bfb 100755
--- a/public/admin/js/notification/js/jquery_notification_v.1.js
+++ b/public/admin/js/notification/js/jquery_notification_v.1.js
@@ -10,89 +10,92 @@
  * 
  * Usage: call this function with params 
  showNotification(params);
- **/
+**/
 
 function showNotification(params){
-    // options array
-    var options = { 
-        'showAfter': 0, // number of sec to wait after page loads
-        'duration': 0, // display duration
-        'autoClose' : false, // flag to autoClose notification message
-        'type' : 'success', // type of info message error/success/info/warning
-        'message': '', // message to dispaly
-        'link_notification' : '', // link flag to show extra description
-        'description' : '' // link to desciption to display on clicking link message
-    }; 
-    // Extending array from params
-    $.extend(true, options, params);
-    
-    var msgclass = 'succ_bg'; // default success message will shown
-    if(options['type'] == 'error'){
-        msgclass = 'error_bg'; // over write the message to error message
-    } else if(options['type'] == 'information'){
-        msgclass = 'info_bg'; // over write the message to information message
-    } else if(options['type'] == 'warning'){
-        msgclass = 'warn_bg'; // over write the message to warning message
-    } 
-    
-    // Parent Div container
-    var container = '<div id="info_message" class="'+msgclass+'"><div class="center_auto"><div class="info_message_text message_area">';
-    container += options['message'];
-    container += '</div><div class="info_close_btn button_area" onclick="return closeNotification()"></div><div class="clearboth"></div>';
-    container += '</div><div class="info_more_descrption"></div></div>';
-    
-    $notification = $(container);
-    
-    // Appeding notification to Body
-    $('body').append($notification);
-    
-    var divHeight = $('div#info_message').height();
-    // see CSS top to minus of div height
-    $('div#info_message').css({
-        top : '-'+divHeight+'px'
-    });
-    
-    // showing notification message, default it will be hidden
-    $('div#info_message').show();
-    
-    // Slide Down notification message after startAfter seconds
-    slideDownNotification(options['showAfter'], options['autoClose'],options['duration']);
-    
-    $('.link_notification').live('click', function(){
-        $('.info_more_descrption').html(options['description']).slideDown('fast');
-    });
+  // options array
+  var options = { 
+    'showAfter': 0, // number of sec to wait after page loads
+    'duration': 0, // display duration
+    'autoClose' : false, // flag to autoClose notification message
+    'type' : 'success', // type of info message error/success/info/warning
+    'message': '', // message to dispaly
+    'link_notification' : '', // link flag to show extra description
+    'description' : '' // link to desciption to display on clicking link message
+  }; 
+  // Extending array from params
+  $.extend(true, options, params);
+  
+  var msgclass = 'succ_bg'; // default success message will shown
+  if(options['type'] == 'error'){
+    msgclass = 'error_bg'; // over write the message to error message
+  } else if(options['type'] == 'information'){
+    msgclass = 'info_bg'; // over write the message to information message
+  } else if(options['type'] == 'warning'){
+    msgclass = 'warn_bg'; // over write the message to warning message
+  } 
+  
+  // Parent Div container
+  var container = '<div id="info_message" role="alert" class="'+msgclass+'"><div class="center_auto"><div class="info_message_text message_area">';
+  container += options['message'];
+  container += '</div><div class="info_close_btn button_area" onclick="return closeNotification()"></div><div class="clearboth"></div>';
+  container += '</div><div class="info_more_descrption"></div></div>';
+  
+  $notification = $(container);
+  
+  // Appeding notification to Body
+  $('body').append($notification);
+
+  var divHeight = $('div#info_message').height();
+  // see CSS top to minus of div height
+  $('div#info_message').css({
+    top : '-'+divHeight+'px'
+  });
+  
+  // showing notification message, default it will be hidden
+  $('div#info_message').show();
     
+  // Slide Down notification message after startAfter seconds
+  slideDownNotification(options['showAfter'], options['autoClose'],options['duration']);
+
+  // Give the focus to the notification for accessibility tools
+  $('div#info_message').attr('tabindex', -1).focus();
+  
+  $('.link_notification').live('click', function(){
+    $('.info_more_descrption').html(options['description']).slideDown('fast');
+  });
+  
 }
 // function to close notification message
 // slideUp the message
 function closeNotification(duration){
-    var divHeight = $('div#info_message').height();
+  var divHeight = $('div#info_message').height();
+  setTimeout(function(){
+    $('div#info_message').animate({
+      top: '-'+divHeight
+    }); 
+    // removing the notification from body
     setTimeout(function(){
-        $('div#info_message').animate({
-            top: '-'+divHeight
-        }); 
-        // removing the notification from body
-        setTimeout(function(){
-            $('div#info_message').remove();
-        },200);
-    }, parseInt(duration * 1000));   
-    
+      $('div#info_message').remove();
+    },200);
+  }, parseInt(duration * 1000));   
+  
 
-    
+  
 }
 
 // sliding down the notification
 function slideDownNotification(startAfter, autoClose, duration){    
-    setTimeout(function(){
-        $('div#info_message').animate({
-            top: 0
-        }); 
-        if(autoClose){
-            setTimeout(function(){
-                closeNotification(duration);
-            }, duration);
-        }
-    }, parseInt(startAfter * 1000));    
+  setTimeout(function(){
+    $('div#info_message').animate({
+      top: 0
+    }); 
+    if(autoClose){
+      setTimeout(function(){
+        closeNotification(duration);
+      }, duration);
+    }
+  }, parseInt(startAfter * 1000));
 }
 
 
diff --git a/public/opac/js/recherche.js b/public/opac/js/recherche.js
index b8866ea112e7c7063703ecacaa2aa35a827b8226..9af1afd2ab3e12c9c2b3020f69d3bf052bec0590 100644
--- a/public/opac/js/recherche.js
+++ b/public/opac/js/recherche.js
@@ -8,42 +8,42 @@ var sBlocInfos=new Object();
 
 function deployer_contracter(sIdObjet)
 {
-	visible = document.getElementById(sIdObjet).style.display;
-	oImg=document.getElementById("I" + sIdObjet);
-	if( visible == "block" ) 
-		{
-			if(oImg != null) oImg.setAttribute("src", imagesUrl + "bouton/plus_carre.gif");
-			document.getElementById(sIdObjet).style.display="none";
-			return false;
-		}
-	else
-		{
-			if(oImg != null) oImg.setAttribute("src", imagesUrl + "bouton/moins_carre.gif");
-			oConteneur=document.getElementById(sIdObjet);
-			oConteneur.style.display="block";
-			return true;
-		}
+  visible = document.getElementById(sIdObjet).style.display;
+  oImg=document.getElementById("I" + sIdObjet);
+  if( visible == "block" ) 
+  {
+    if(oImg != null) oImg.setAttribute("src", imagesUrl + "bouton/plus_carre.gif");
+    document.getElementById(sIdObjet).style.display="none";
+    return false;
+  }
+  else
+  {
+    if(oImg != null) oImg.setAttribute("src", imagesUrl + "bouton/moins_carre.gif");
+    oConteneur=document.getElementById(sIdObjet);
+    oConteneur.style.display="block";
+    return true;
+  }
 }
 
 function refreshOnglet(sIdOnglet)
 {
-	sBlocInfos=new Object();
-	obj=document.getElementById(sIdOnglet);
-	var sOnclick=obj.onclick;
-	sOnclick=sOnclick.toString();
-	sOnclick=sOnclick.replace("this.id","'" + sIdOnglet + "'");
-	nPos=sOnclick.indexOf("{",0)+1;
-	nPosFin=sOnclick.indexOf("}",0);
-	sOnclick=sOnclick.substring(nPos,nPosFin);
-	//On clique 2 fois pour fermer puis recharger
-	eval(sOnclick + ";");
-	eval(sOnclick + ";");
+  sBlocInfos=new Object();
+  obj=document.getElementById(sIdOnglet);
+  var sOnclick=obj.onclick;
+  sOnclick=sOnclick.toString();
+  sOnclick=sOnclick.replace("this.id","'" + sIdOnglet + "'");
+  nPos=sOnclick.indexOf("{",0)+1;
+  nPosFin=sOnclick.indexOf("}",0);
+  sOnclick=sOnclick.substring(nPos,nPosFin);
+  //On clique 2 fois pour fermer puis recharger
+  eval(sOnclick + ";");
+  eval(sOnclick + ";");
 }
 
 function getNoticeAjax(sIdNotice,sContainer,sTypeDoc)
 {
-	sUrl=baseUrl + '/opac/noticeajax/notice?id_notice='+ sIdNotice + "&type_doc=" + sTypeDoc;
-	$('#' + sContainer).load(sUrl);
+  sUrl=baseUrl + '/opac/noticeajax/notice?id_notice='+ sIdNotice + "&type_doc=" + sTypeDoc;
+  $('#' + sContainer).load(sUrl);
 }
 
 ////////////////////////////////////////////////////////////////////////////////////
@@ -52,145 +52,156 @@ function getNoticeAjax(sIdNotice,sContainer,sTypeDoc)
 function infos_onglet(sIdOngletCourant,sIsbn,sType,sCherche,nNiveau,nPage,sUrl)
 {
 
-	$('.onglet_select').attr('className','onglet').removeClass('onglet_select');
-	$('#'+sIdOngletCourant).attr('className','onglet_select').addClass('onglet_select');
-	$('div.onglet').css('display','none');
-	
-	sIdRoot=sIdOngletCourant;
-	nPos=sIdRoot.lastIndexOf("_");
-	sIdRoot=sIdRoot.substr(0,nPos + 1);
-	nIdNotice=sIdRoot.substr(3,nPos-1).replace("_onglet_","");
-
-	if (sUrl == undefined)
-		sUrl=baseUrl + '/opac/noticeajax/'+ sType;
-
-	sUrl = sUrl + '?isbn=' + sIsbn + '&onglet=' + sIdOngletCourant + '&page=' + nPage +'&id_notice='+ nIdNotice;
-
-	if(sCherche) sUrl = sUrl + '&cherche=' + sCherche;
-
-	var onglet = $('#' + sIdOngletCourant +'_contenu');
-	onglet
-		.css('display','block')
-		.css('max-width', onglet.parent().width()+'px')
-		.load(sUrl, function() { 
-			initializePopups();
-			blocNoticeAfterLoad(sType, sIsbn, onglet); 
-		});
+  $('.onglet_select').attr('className','onglet').removeClass('onglet_select');
+  $('#'+sIdOngletCourant).attr('className','onglet_select').addClass('onglet_select');
+  $('div.onglet').css('display','none');
+  
+  sIdRoot=sIdOngletCourant;
+  nPos=sIdRoot.lastIndexOf("_");
+  sIdRoot=sIdRoot.substr(0,nPos + 1);
+  nIdNotice=sIdRoot.substr(3,nPos-1).replace("_onglet_","");
+
+  if (sUrl == undefined)
+    sUrl=baseUrl + '/opac/noticeajax/'+ sType;
+
+  sUrl = sUrl + '?isbn=' + sIsbn + '&onglet=' + sIdOngletCourant + '&page=' + nPage +'&id_notice='+ nIdNotice;
+
+  if(sCherche) sUrl = sUrl + '&cherche=' + sCherche;
+
+  var onglet = $('#' + sIdOngletCourant +'_contenu');
+  onglet
+    .css('display','block')
+    .css('max-width', onglet.parent().width()+'px')
+    .load(sUrl, function() { 
+      initializePopups();
+      blocNoticeAfterLoad(sType, sIsbn, onglet); 
+    });
 }
 
 
 if (undefined == window.blocNoticeAfterLoad) 
-	window.blocNoticeAfterLoad = function (info, isbn, target) {};
+  window.blocNoticeAfterLoad = function (info, isbn, target) {};
 
 
 function infos_bloc(sIdBloc,sIsbn,sType,sCherche,nNiveau,nPage, sUrl) {
-	if(sIdBloc.substr(0,1) == "I" ) sIdBloc=sIdBloc.substr(1,sIdBloc.length);
-	oImg=document.getElementById("I" + sIdBloc);
-	oContenu=document.getElementById(sIdBloc + "_contenu");
-    oParent = oImg.parentNode.parentNode;
-
-	if(oContenu.style.display =="block" && !sCherche)	{
-		oImg.setAttribute("src", imagesUrl + "bouton/plus_carre.gif");
-	    oParent.className = oParent.className.replace(/\b deplier\b/,'');
-	    $(oContenu).slideUp();
-		return;
-	}
+  if(sIdBloc.substr(0,1) == "I" ) sIdBloc=sIdBloc.substr(1,sIdBloc.length);
+  oImg=document.getElementById("I" + sIdBloc);
+  oContenu=document.getElementById(sIdBloc + "_contenu");
+  oParent = oImg.parentNode.parentNode;
+
+  if(oContenu.style.display =="block" && !sCherche)	{
+    oImg.setAttribute("src", imagesUrl + "bouton/plus_carre.gif");
+    oParent.className = oParent.className.replace(/\b deplier\b/,'');
+    $(oContenu).slideUp();
+    return;
+  }
 
-	oImg.setAttribute("src", imagesUrl + "bouton/moins_carre.gif");
+  oImg.setAttribute("src", imagesUrl + "bouton/moins_carre.gif");
 
   oParent.className= oParent.className+" deplier";
   $(oContenu).slideDown();
-	nPos=sIdBloc.lastIndexOf("_");
-	nIdNotice=sIdBloc.substr(5,nPos-5);
+  nPos=sIdBloc.lastIndexOf("_");
+  nIdNotice=sIdBloc.substr(5,nPos-5);
 
-	if (sUrl == undefined)
-		sUrl=baseUrl + '/opac/noticeajax/'+ sType;
-	sUrl = sUrl + '?isbn=' + sIsbn + '&onglet=' + sIdBloc + '&page=' + nPage +'&id_notice=N'+ nIdNotice;
+  if (sUrl == undefined)
+    sUrl=baseUrl + '/opac/noticeajax/'+ sType;
+  sUrl = sUrl + '?isbn=' + sIsbn + '&onglet=' + sIdBloc + '&page=' + nPage +'&id_notice=N'+ nIdNotice;
 
-	if(sCherche) sUrl = sUrl + '&cherche=' + sCherche;
+  if(sCherche) sUrl = sUrl + '&cherche=' + sCherche;
 
-	var bloc = $('#'+sIdBloc + '_contenu');
-	var width = bloc.width();
-	sUrl = sUrl + '&width='+width;
+  var bloc = $('#'+sIdBloc + '_contenu');
+  var width = bloc.width();
+  sUrl = sUrl + '&width='+width;
 
-	bloc
-		.css('max-width', width+'px')
-		.load(sUrl, function() { 
-			initializePopups();
-			blocNoticeAfterLoad(sType, sIsbn, bloc); 
-		});
+  bloc
+    .css('max-width', width+'px')
+    .load(sUrl, function() { 
+      initializePopups();
+      blocNoticeAfterLoad(sType, sIsbn, bloc); 
+    });
 }
-	
+
 function fermer_infos_notice(sId)
 {
-	$('#'+sId).attr('className','onglet').attr('class','onglet');
-	$('#'+sId+'_contenu').css('display','none');
+  $('#'+sId).attr('className','onglet').attr('class','onglet');
+  $('#'+sId+'_contenu').css('display','none');
 }
 
 //////////////////////////////////////////////////////////////////////////////////
 // Localiser exemplaire sur le plan
 /////////////////////////////////////////////////////////////////////////////////
 var saveImg="";
-function localisationExemplaire(oImg,nIdBib,sCote,sCodeBarres) {
-	saveImg=$(oImg).attr('src');
-	$(oImg).attr('src',imagesUrl+'patience.gif');
-	sUrl=baseUrl+'/opac/noticeajax/localisation/id_bib/' + nIdBib + '?cote='+ sCote + '&code_barres=' + sCodeBarres;
-	$.getJSON(sUrl, function(data) {
-		if(data.erreur > '') {$(oImg).attr('src',saveImg); alert(data.erreur); return; }
-		if(data.url == null) {localisationBulle(data.titre,data.description,data.photo); return; }
-
-		$('#point_localisation > img').attr('src',data.animation);
-		$('#point_localisation').click(function(){ localisationBulle(oImg,data.titre,data.description,data.photo)});
-		$('#plan_localisation').html('<a href="'+data.url+'" rel="lightbox" title="'+data.description+'"><img id="img_plan" src="'+data.url+'" posX="'+data.posX+'" posY="'+data.posY+'"></a>');
-
-		$("a[rel^='lightbox']").butterfly({
-			callbackPreClose:function() {
-				$('#point_localisation').css('display','none');
-				$(oImg).attr('src',saveImg);
-			},
-			callbackPostOpen: localisationLoaded,
-			collapseHeightWhenPossible: false,
-			closeButton: false,
-			treatAsImage: true
-		});
-
-		$('#img_plan').trigger('click');
-	});
-}
 
+function localisationExemplaire(localization_img, id_bib, sCote, sCodeBarres) {
+  localization_img_backup = $(localization_img).attr('src');
+  $(localization_img).attr('src',imagesUrl+'patience.gif');
+  var restore_localization_img = function(){ $(localization_img).attr('src', localization_img_backup); };
+
+  $.getJSON(baseUrl+'/opac/noticeajax/localisation/id_bib/' + id_bib + '?cote='+ sCote + '&code_barres=' + sCodeBarres, 
+	    function(data) {
+	      if(data.erreur > '') {
+		restore_localization_img(); 
+		alert(data.erreur); 
+		return; 
+	      }
+
+	      if(data.url == null) {
+		localisationBulle(data.titre, data.description, data.photo); 
+		return; 
+	      }
+
+	      var admin_slimbox_border_size = 10;
+	      var point_localization = $('<div style="position:absolute;z-index:10000;cursor:pointer"><img src="' + data.animation + '"></div>');
+	      point_localization
+		.css('top', (data.posY-admin_slimbox_border_size) + 'px')
+		.css('left', (data.posX-admin_slimbox_border_size) + 'px')
+		.click(function(){ 
+		  localisationBulle(localization_img,
+				    data.libelle,
+				    data.description,
+				    data.photo)
+		});
 
-function localisationLoaded() {
-	$('#point_localisation').css('display','block');
-	x=parseInt($('#img_plan').attr('posX'));
-	y=parseInt($('#img_plan').attr('posY'));
-	container=$('#jb-window-content').offset();
-	x+= container.left;
-	y+=container.top;
-	$('#point_localisation')
-		.css('display','block')
-		.css('top',y+'px')
-		.css('left',x+'px');
 
+	      var plan = $('<a href="'+data.url+'" title="'+data.description+'"><img id="img_plan" src="'+data.url+'"></a>');
+	      $('body').append(plan);
+	      
+	      plan.butterfly({
+		callbackPreClose:function() {
+		  point_localization.remove();
+		  plan.remove();
+		  restore_localization_img(); 
+		},
+		callbackPostOpen: function() {
+		  $('#jb-window-content')
+		    .append(point_localization);
+		},
+		collapseHeightWhenPossible: false,
+		closeButton: false,
+		treatAsImage: false
+	      });
+
+	      plan.trigger('click');
+	    });
 }
 
 
 function localisationBulle(oImg,titre,description,image) {
-	// Ajouter le contenu
-	if( image > '') image='<img src="'+image+'" style="margin-right:10px;float:left;width:150px">';
-	$("#bulle_localisation").attr('title',titre).html(image+'<p>'+description+'</p>');
-
-	// Afficher
-	$("#bulle_localisation").dialog
-	({
-		modal:true,
-		resizable: false,
-		width: 300,
-		zIndex: 1000,
-		open: function( event, ui )  {	$(".ui-dialog").css('z-index', '1000'); },
-		buttons: { "Fermer": function() { $(this).dialog("close"); } }
-	});
-
-	$(oImg).attr('src',saveImg);
+  if ( image > '') 
+    image='<img src="'+image+'" style="margin-right:10px;float:left;width:150px">';
+  
+  var bulle_localization = $('<div>' + image + '<p>' + description + '</p></div>');
+
+  bulle_localization.dialog
+  ({
+    modal:true,
+    resizable: false,
+    width: 300,
+    zIndex: 1000,
+    title: titre,
+    open: function( event, ui )  {	$(".ui-dialog").css('z-index', '1000'); },
+    buttons: { "Fermer": function() { $(this).dialog("close"); } }
+  });
 }
 
 ////////////////////////////////////////////////////////////////////////////////////
@@ -199,119 +210,119 @@ function localisationBulle(oImg,titre,description,image) {
 
 function afficher_image(sUrl)
 {
-    bProcessing=false;
-    if(!sUrl)
-    {
-        alert("Grande image non disponible.");
-        return;
-    }
-    afficher_fond_gris(true);
-    oBoite=document.getElementById("img_boite");
-    if(!oBoite)
-    {
-        oBoite=document.createElement("div");
-        oBoite.setAttribute("id","img_boite");
-        oBoite.setAttribute("class","notice_img");
-        oBoite.setAttribute("className","notice_img");
-        oBoite.setAttribute("style","display:block;position:absolute");
-        document.body.appendChild(oBoite);
-    }
-    // Patience
-    sHtml='<center><table style="margin-top:40px"><tr><td class="notice_patience" style="text-align:right;width:15px"><img src="' + imagesUrl + 'patience.gif"';
-    sHtml+='border="0"></td><td><b>&nbsp;Veuillez patienter chargement en cours...</b></td></tr></table>';
-    oBoite.innerHTML=sHtml;
-    centrer_image(oBoite,300,100, false);
-
-    // Charger image
-    oImage = new Image();
-    oImage.src=sUrl;
-    oImage.onError = function()
-    {
-        oBoite.style.display="none";
-        afficher_fond_gris(false);
-        alert("Une erreur s'est produite au chargement de l'image.");
-    };
-    setTimeout( 'image_completed(oImage)', 100 );
+  bProcessing=false;
+  if(!sUrl)
+  {
+    alert("Grande image non disponible.");
+    return;
+  }
+  afficher_fond_gris(true);
+  oBoite=document.getElementById("img_boite");
+  if(!oBoite)
+  {
+    oBoite=document.createElement("div");
+    oBoite.setAttribute("id","img_boite");
+    oBoite.setAttribute("class","notice_img");
+    oBoite.setAttribute("className","notice_img");
+    oBoite.setAttribute("style","display:block;position:absolute");
+    document.body.appendChild(oBoite);
+  }
+  // Patience
+  sHtml='<center><table style="margin-top:40px"><tr><td class="notice_patience" style="text-align:right;width:15px"><img src="' + imagesUrl + 'patience.gif"';
+  sHtml+='border="0"></td><td><b>&nbsp;Veuillez patienter chargement en cours...</b></td></tr></table>';
+  oBoite.innerHTML=sHtml;
+  centrer_image(oBoite,300,100, false);
+
+  // Charger image
+  oImage = new Image();
+  oImage.src=sUrl;
+  oImage.onError = function()
+  {
+    oBoite.style.display="none";
+    afficher_fond_gris(false);
+    alert("Une erreur s'est produite au chargement de l'image.");
+  };
+  setTimeout( 'image_completed(oImage)', 100 );
 }
 
 function image_completed()
 {
-    if(oImage.complete == true)
-    {
-        sOnclick='document.getElementById(\'img_boite\').style.display=\'none\';afficher_fond_gris(false);';
-        sHtml='<div style="height:30px;width:100%;text-align:right;margin-top:5px;"><a href="#" onclick="' + sOnclick + '">'
-        sHtml+='&raquo&nbsp;Fermer l\'image&nbsp;&nbsp;</a></div>';
-        sHtml+='<img border="0" id="img_image" style="margin:10px;margin-top:0px;border:1px solid;border-color:#bfbfbf;cursor:pointer;"';
-        sHtml+=' src="' + oImage.src + '" onclick="' + sOnclick + '">';
-        oBoite=document.getElementById('img_boite');
-        oBoite.innerHTML=sHtml;
-        centrer_image(oBoite,(oImage.width + 20) ,(oImage.height + 50), true);
-    }
-    else setTimeout( 'image_completed(oImage)', 100 );
+  if(oImage.complete == true)
+  {
+    sOnclick='document.getElementById(\'img_boite\').style.display=\'none\';afficher_fond_gris(false);';
+    sHtml='<div style="height:30px;width:100%;text-align:right;margin-top:5px;"><a href="#" onclick="' + sOnclick + '">'
+    sHtml+='&raquo&nbsp;Fermer l\'image&nbsp;&nbsp;</a></div>';
+    sHtml+='<img border="0" id="img_image" style="margin:10px;margin-top:0px;border:1px solid;border-color:#bfbfbf;cursor:pointer;"';
+    sHtml+=' src="' + oImage.src + '" onclick="' + sOnclick + '">';
+    oBoite=document.getElementById('img_boite');
+    oBoite.innerHTML=sHtml;
+    centrer_image(oBoite,(oImage.width + 20) ,(oImage.height + 50), true);
+  }
+  else setTimeout( 'image_completed(oImage)', 100 );
 }
 
 function centrer_image(oBoite, nLargeur, nHauteur, bProgressif)
 {
-    oBoite.style.display="none";
-    // Positionnement
-    var left = parseInt((screen.availWidth/2) - (nLargeur/2));
-    var top = parseInt((screen.availHeight/2) - (nHauteur/2));
-    if(left < 0 ) left=0;
-    if(top < 0) top=0;
-    oBoite.style.left=left + "px";
-    oBoite.style.top=document.documentElement.scrollTop + top + "px";
-    oBoite.style.width=nLargeur + "px";
-    oBoite.style.height=nHauteur + "px";
-    // Si image plus grande que fonds gris on agrandit le fond gris
-    if((nHauteur + top) > document.getElementById("img_fond").height)
-    {
-        nHauteurFond=nHauteur + parseInt(oBoite.style.top);
-        document.getElementById("img_fond").style.height=nHauteurFond + "px";
-    }
-    if(bProgressif == false )
-    {
-        oBoite.style.display="block";
-        return;
-    }
-	
-    // Affichage progressif
-    oBoite.style.opacity =0;
-    oBoite.style.filter = 'alpha(opacity=1)';
+  oBoite.style.display="none";
+  // Positionnement
+  var left = parseInt((screen.availWidth/2) - (nLargeur/2));
+  var top = parseInt((screen.availHeight/2) - (nHauteur/2));
+  if(left < 0 ) left=0;
+  if(top < 0) top=0;
+  oBoite.style.left=left + "px";
+  oBoite.style.top=document.documentElement.scrollTop + top + "px";
+  oBoite.style.width=nLargeur + "px";
+  oBoite.style.height=nHauteur + "px";
+  // Si image plus grande que fonds gris on agrandit le fond gris
+  if((nHauteur + top) > document.getElementById("img_fond").height)
+  {
+    nHauteurFond=nHauteur + parseInt(oBoite.style.top);
+    document.getElementById("img_fond").style.height=nHauteurFond + "px";
+  }
+  if(bProgressif == false )
+  {
     oBoite.style.display="block";
-    for( var i = 0; i <= 100; i++ )
-        setTimeout( 'setOpacity("img_boite",' + (i / 10) + ')' , 20 * i );
+    return;
+  }
+  
+  // Affichage progressif
+  oBoite.style.opacity =0;
+  oBoite.style.filter = 'alpha(opacity=1)';
+  oBoite.style.display="block";
+  for( var i = 0; i <= 100; i++ )
+    setTimeout( 'setOpacity("img_boite",' + (i / 10) + ')' , 20 * i );
 }
 
 // Fond pour modal dialog 
 function afficher_fond_gris(bMode)
 {
-    oFondGris=document.getElementById("fond_gris");
-    if(!oFondGris)
-    {
-        oFondGris=document.createElement("div");
-        oFondGris.setAttribute("id","fond_gris");
-        document.body.appendChild(oFondGris);
-    }
-    oFondGris.style.display="none";
-    if(bMode == false) return;
-    oFondGris.style.position="absolute";
-    oFondGris.style.opacity="0.4";
-    oFondGris.style.filter = 'alpha(opacity="40")';
-    oFondGris.style.top="0px";
-    oFondGris.style.left="0px";
-    oFondGris.style.width="100%";
-    sHauteur=document.body.clientHeight + "px";
-    sHtml='<img id="img_fond" src="' + imagesUrl + 'fond-gris.gif" width="100%" height="' + sHauteur + '">';
-    oFondGris.innerHTML=sHtml;
-    oFondGris.style.display="block";
-    return;
+  oFondGris=document.getElementById("fond_gris");
+  if(!oFondGris)
+  {
+    oFondGris=document.createElement("div");
+    oFondGris.setAttribute("id","fond_gris");
+    document.body.appendChild(oFondGris);
+  }
+  oFondGris.style.display="none";
+  if(bMode == false) return;
+  oFondGris.style.position="absolute";
+  oFondGris.style.opacity="0.4";
+  oFondGris.style.filter = 'alpha(opacity="40")';
+  oFondGris.style.top="0px";
+  oFondGris.style.left="0px";
+  oFondGris.style.width="100%";
+  sHauteur=document.body.clientHeight + "px";
+  sHtml='<img id="img_fond" src="' + imagesUrl + 'fond-gris.gif" width="100%" height="' + sHauteur + '">';
+  oFondGris.innerHTML=sHtml;
+  oFondGris.style.display="block";
+  return;
 }
 
 function setOpacity( sIdBoite, value ) 
 {
-    oObj=document.getElementById(sIdBoite);
-    oObj.style.opacity = value / 10;
-    oObj.style.filter = 'alpha(opacity=' + value * 10 + ')';
+  oObj=document.getElementById(sIdBoite);
+  oObj.style.opacity = value / 10;
+  oObj.style.filter = 'alpha(opacity=' + value * 10 + ')';
 }
 
 //////////////////////////////////////////////////////////////////////////////////
@@ -321,21 +332,21 @@ var oLastFm;
 
 function afficher_media(sIdObjet,sUrl,sType)
 {
-    $("div[rel='video']").html(sPatience).css('display','none');
-		if(sUrl == "close") return;
-		$('#'+sIdObjet).css('display','block');
-		oObjet=document.getElementById(sIdObjet);
-    if(sType == "real_audio")
-    {
-        sHtml='<embed src="'+ sUrl +'" width="200" height="36" loop="false" type="audio/x-pn-realaudio-plugin" controls="ControlPanel" autostart="true"></embed>';
-    }
-    if(sType == "last_fm")
-    {
-        //alert(sUrl);
-        sElem=sUrl.split(';');
-        sHtml='<embed id="lfmPlayer" height="221" width="300" align="middle" swliveconnect="true" name="lfmPlayer" allowfullscreen="true" allowscriptaccess="always" flashvars="lang=fr&lfmMode=playlist&FOD=true&resname='+ sElem[0] +'&restype=track&artist='+ sElem[1] +'&albumArt=&autostart=true" bgcolor="#fff" wmode="transparent" quality="high" menu="true" pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://cdn.last.fm/webclient/s12n/s/5/lfmPlayer.swf" type="application/x-shockwave-flash"/>';
-    }
-    oObjet.innerHTML=sHtml;
+  $("div[rel='video']").html(sPatience).css('display','none');
+  if(sUrl == "close") return;
+  $('#'+sIdObjet).css('display','block');
+  oObjet=document.getElementById(sIdObjet);
+  if(sType == "real_audio")
+  {
+    sHtml='<embed src="'+ sUrl +'" width="200" height="36" loop="false" type="audio/x-pn-realaudio-plugin" controls="ControlPanel" autostart="true"></embed>';
+  }
+  if(sType == "last_fm")
+  {
+    //alert(sUrl);
+    sElem=sUrl.split(';');
+    sHtml='<embed id="lfmPlayer" height="221" width="300" align="middle" swliveconnect="true" name="lfmPlayer" allowfullscreen="true" allowscriptaccess="always" flashvars="lang=fr&lfmMode=playlist&FOD=true&resname='+ sElem[0] +'&restype=track&artist='+ sElem[1] +'&albumArt=&autostart=true" bgcolor="#fff" wmode="transparent" quality="high" menu="true" pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://cdn.last.fm/webclient/s12n/s/5/lfmPlayer.swf" type="application/x-shockwave-flash"/>';
+  }
+  oObjet.innerHTML=sHtml;
 }
 
 //////////////////////////////////////////////////////////////////////////////////
@@ -343,11 +354,11 @@ function afficher_media(sIdObjet,sUrl,sType)
 /////////////////////////////////////////////////////////////////////////////////
 
 function chercher_videos(sId,sAuteur,sTitre) {
-	var width = $('#'+sId).parent().width();
-	$("div[rel='video']").html(sPatience).css('display','none');
-	sUrl=baseUrl+'/opac/noticeajax/videomorceau?auteur='+sAuteur+'&titre='+sTitre+'&width='+width;
-	$('#'+sId).css('display','block');
-	$.get(sUrl, function(data) { $('#'+sId).html(data); });
+  var width = $('#'+sId).parent().width();
+  $("div[rel='video']").html(sPatience).css('display','none');
+  sUrl=baseUrl+'/opac/noticeajax/videomorceau?auteur='+sAuteur+'&titre='+sTitre+'&width='+width;
+  $('#'+sId).css('display','block');
+  $.get(sUrl, function(data) { $('#'+sId).html(data); });
 }
 
 ////////////////////////////////////////////////////////////////////////////////////
@@ -355,21 +366,21 @@ function chercher_videos(sId,sAuteur,sTitre) {
 ///////////////////////////////////////////////////////////////////////////////////
 function reservationAjax(oImg,nIdBib,sIdOrigine, sCodeAnnexe)
 {
-	var sUrl=baseUrl+'/recherche/reservationajax?id_bib='+nIdBib+"&id_origine="+sIdOrigine+"&code_annexe="+sCodeAnnexe;
-	var saveImg=$(oImg).attr('src');
-	$(oImg).attr('src',imagesUrl+'patience.gif');
-	$.getJSON(sUrl, function(data)	{
-		$(oImg).attr('src',saveImg);
-
-		if (data.indexOf('http') == 0)
-			showPopWin(data, 500, 345, 
-								 function(event, ui) {
-									 if (undefined == event.currentTarget)
-										 reservationAjax(oImg,nIdBib,sIdOrigine, sCodeAnnexe);
-								 });
-		else 
-			alert(data);
-	});
+  var sUrl=baseUrl+'/recherche/reservationajax?id_bib='+nIdBib+"&id_origine="+sIdOrigine+"&code_annexe="+sCodeAnnexe;
+  var saveImg=$(oImg).attr('src');
+  $(oImg).attr('src',imagesUrl+'patience.gif');
+  $.getJSON(sUrl, function(data)	{
+    $(oImg).attr('src',saveImg);
+
+    if (data.indexOf('http') == 0)
+      showPopWin(data, 500, 345, 
+		 function(event, ui) {
+		   if (undefined == event.currentTarget)
+		     reservationAjax(oImg,nIdBib,sIdOrigine, sCodeAnnexe);
+		 });
+    else 
+      alert(data);
+  });
 }
 
 
@@ -377,45 +388,45 @@ var pickupImgCallback;
 var pickupConfirmCallBack;
 function reservationPickupAjax(oImg,nIdBib,sIdOrigine,sCodeAnnexe)
 {
-	var sUrl = baseUrl+'/recherche/reservation-pickup-ajax?id_bib='+nIdBib+"&id_origine="+sIdOrigine+"&code_annexe="+sCodeAnnexe;
-	var saveImg = $(oImg).attr('src');
-	pickupImgLoadingCallback = function() {
-		$(oImg).attr('src', saveImg);
-	};
-	pickupConfirmCallBack = function(form) {
-		reservationPickupAjaxCancel();
-		var sCodeAnnexe = $(form).find('input:radio[name="code_annexe"]:checked').val();
-		reservationAjax(oImg, nIdBib, sIdOrigine, sCodeAnnexe);
-	};
-    
-    var img = $(oImg).attr('src');
-	$(oImg).attr('src',imagesUrl+'patience.gif');
-	showPopWin(sUrl, 500, 345, function(){$(oImg).attr('src',img);});
+  var sUrl = baseUrl+'/recherche/reservation-pickup-ajax?id_bib='+nIdBib+"&id_origine="+sIdOrigine+"&code_annexe="+sCodeAnnexe;
+  var saveImg = $(oImg).attr('src');
+  pickupImgLoadingCallback = function() {
+    $(oImg).attr('src', saveImg);
+  };
+  pickupConfirmCallBack = function(form) {
+    reservationPickupAjaxCancel();
+    var sCodeAnnexe = $(form).find('input:radio[name="code_annexe"]:checked').val();
+    reservationAjax(oImg, nIdBib, sIdOrigine, sCodeAnnexe);
+  };
+  
+  var img = $(oImg).attr('src');
+  $(oImg).attr('src',imagesUrl+'patience.gif');
+  showPopWin(sUrl, 500, 345, function(){$(oImg).attr('src',img);});
 }
 
 
 function reservationPickupAjaxCancel() {
-	pickupImgLoadingCallback();
-	hidePopWin(false);
+  pickupImgLoadingCallback();
+  hidePopWin(false);
 }
 
 
 function reservationPickupAjaxConfirm(form) {
-	pickupConfirmCallBack(form);
+  pickupConfirmCallBack(form);
 }
 
 
 
 var scrollToSelectedNoticeInResult = function() {
-	var parts = window.location.href.split("#");
+  var parts = window.location.href.split("#");
   var trgt = parts[1];
 
-	if (trgt == undefined)
-		return;
+  if (trgt == undefined)
+    return;
 
   var offset = $('div[data-id="'+trgt+'"]').offset();
-	if (offset == undefined)
-		return;
+  if (offset == undefined)
+    return;
 
   $('html, body').animate({scrollTop:offset.top}, 500, 'easeInSine');
 }
diff --git a/tests/application/modules/admin/controllers/AdminAvisModerationControllerTest.php b/tests/application/modules/admin/controllers/AdminAvisModerationControllerTest.php
index 9a77e0098ca1bb33042855e4dd53cbddfdb19d26..2f9324112698c367aac768888c8e5b30a2f3ca2e 100644
--- a/tests/application/modules/admin/controllers/AdminAvisModerationControllerTest.php
+++ b/tests/application/modules/admin/controllers/AdminAvisModerationControllerTest.php
@@ -362,7 +362,7 @@ class AdminAvisModerationControllerCmsWithAvisTest extends AdminAvisModerationCo
   /** @test */
   public function pageShouldContainsLinkToArticle() {
     $this->assertXPathContentContains('//a[contains(@href, "/admin/cms/viewcms/id/9")]',
-                                      "Tintin à Annecy",
+                                     "Tintin à Annecy",
                                       $this->_response->getBody());
   }
 
diff --git a/tests/application/modules/admin/controllers/ModoControllerFormulaireTest.php b/tests/application/modules/admin/controllers/ModoControllerFormulaireTest.php
index 8cc6e5d8bc5c3137664a1d176144cef5a59844e3..06f645086f9fc11ff741c599a4f0acbc6c7d0e24 100644
--- a/tests/application/modules/admin/controllers/ModoControllerFormulaireTest.php
+++ b/tests/application/modules/admin/controllers/ModoControllerFormulaireTest.php
@@ -72,6 +72,14 @@ abstract class ModoControllerFormulaireForArticleTestCase extends Admin_Abstract
                                             'date_creation' => '2012-11-06 17:00:01',
                                             'article' => $article]);
 
+    $arold_form = $this->fixture('Class_Formulaire',
+                                 ['id' => 98,
+                                  'data' => serialize(['name' => '<script>$("body *").remove();</script>',
+                                                       'prenom' => '<script>$("body").append("Welcome");</script>',
+                                                       'age' => '111']),
+                                  'date_creation' => '2012-11-06 17:00:01',
+                                  'article' => $article]);
+
     Storm_Test_ObjectWrapper::onLoaderOfModel('Class_Formulaire')
       ->whenCalled('findAllBy')
       ->with(['role' => 'article',
@@ -79,7 +87,8 @@ abstract class ModoControllerFormulaireForArticleTestCase extends Admin_Abstract
               'order' => 'date_creation desc'])
       ->answers([$formulaire_de_tinguette,
                  $this->formulaire_de_bougie,
-                 $formulaire_de_lefort])
+                 $formulaire_de_lefort,
+                 $arold_form])
 
       ->whenCalled('findAllBy')
       ->with([ 'role' => 'article',
@@ -199,6 +208,12 @@ class ModoControllerFormulaireForArticleListWithListeAllParameterTest extends Mo
   public function mainFormulairesMenuShouldNotContainsIdArticleParam() {
     $this->assertXPath('//div[@class="menu"]//a[@href="/admin/modo/formulaires/liste/all"]');
   }
+
+
+  /** @test */
+  public function aroldFormulairesShouldNotContainsScriptTags() {
+    $this->assertNotXPath('//tr//td//script');
+  }
 }
 
 
diff --git a/tests/library/Class/AgendaSQYImportTest.php b/tests/library/Class/AgendaSQYImportTest.php
index 7da00334b869cdebc35bcd9b0a94a3299e6dbac9..f8eafbd9ddc8708dd574772d15524dd4abba595c 100644
--- a/tests/library/Class/AgendaSQYImportTest.php
+++ b/tests/library/Class/AgendaSQYImportTest.php
@@ -78,7 +78,7 @@ class AgendaSQYImportTest extends Storm_Test_ModelTestCase {
 
     Storm_Test_ObjectWrapper::onLoaderOfModel('Class_Catalogue')
     ->whenCalled('save')->answers(true)
-    ->whenCalled('findAllBy')->answers(null)
+    ->whenCalled('findAllBy')->answers([])
     ->whenCalled('findAllBy')->with(['where' => 'parent_id is null',
                                      'order' => 'libelle'])->answers([$domaine_musique]);
 
@@ -96,7 +96,7 @@ class AgendaSQYImportTest extends Storm_Test_ModelTestCase {
 
     Storm_Test_ObjectWrapper::onLoaderOfModel('Class_ArticleCategorie')
     ->whenCalled('save')->answers(true)
-    ->whenCalled('findAllBy')->answers(null)
+    ->whenCalled('findAllBy')->answers([])
     ->whenCalled('findAllBy')->with(['id_cat_mere' => 0])->answers([$categorie_musique]);
 
 
@@ -379,8 +379,8 @@ class AgendaSQYImportTest extends Storm_Test_ModelTestCase {
   }
 
 
-  /** 
-   * @test 
+  /**
+   * @test
    * @depends lieuFermeBelEbatShouldHavePhone0130483344
    */
   public function lieuFermeBelEbatMailShouldBeSet($ferme) {
@@ -388,16 +388,16 @@ class AgendaSQYImportTest extends Storm_Test_ModelTestCase {
   }
 
 
-  /** 
-   * @test 
+  /**
+   * @test
    * @depends lieuFermeBelEbatShouldHavePhone0130483344
    */
   public function lieuFermeBelEbatLatitueShouldBe48_7($ferme) {
     $this->assertEquals('48.770757', $ferme->getLatitude());
   }
 
-  /** 
-   * @test 
+  /**
+   * @test
    * @depends lieuFermeBelEbatShouldHavePhone0130483344
    */
   public function lieuFermeBelEbatLongitudeShouldBe2($ferme) {
@@ -405,8 +405,8 @@ class AgendaSQYImportTest extends Storm_Test_ModelTestCase {
   }
 
 
-  /** 
-   * @test 
+  /**
+   * @test
    * @depends lieuFermeBelEbatShouldHavePhone0130483344
    */
   public function lieuFermeBelEbatUrlShouldBeLaFermeDeBelEbatDotFr($ferme) {
diff --git a/tests/library/Class/Cosmogramme/Integration/PhaseDeleteItemsTest.php b/tests/library/Class/Cosmogramme/Integration/PhaseDeleteItemsTest.php
index f3271d174039029a6ffe7dcd9eab618023873f95..d9256b5a23ce4d2274bb140f1d81f8a57707f0db 100644
--- a/tests/library/Class/Cosmogramme/Integration/PhaseDeleteItemsTest.php
+++ b/tests/library/Class/Cosmogramme/Integration/PhaseDeleteItemsTest.php
@@ -21,7 +21,8 @@
 
 require_once('cosmogramme/php/fonctions/variables.php');
 
-class PhaseDeleteItemsTest extends  Class_Cosmogramme_Integration_PhaseTestCase {
+
+abstract class PhaseDeleteItemsTestCase extends Class_Cosmogramme_Integration_PhaseTestCase {
   protected $_phase;
 
   public function setUp() {
@@ -30,7 +31,6 @@ class PhaseDeleteItemsTest extends  Class_Cosmogramme_Integration_PhaseTestCase
     $this->_phase = $this->_buildPhase('DeleteItem')->run();
   }
 
-
   protected function _prepareFixtures() {
     $this->fixture('Class_IntProfilDonnees',
                    ['id' => 102,
@@ -59,6 +59,20 @@ class PhaseDeleteItemsTest extends  Class_Cosmogramme_Integration_PhaseTestCase
                     'traite' => 'non',
                     'fichier' => 'barcodes_deleted.txt',
                     'pointeur_reprise' => 0]);
+  }
+
+
+  protected function _getPreviousPhase() {
+    return (new Class_Cosmogramme_Integration_Phase(1))
+      ->beCron();
+  }
+}
+
+
+
+class PhaseDeleteItemsTest extends PhaseDeleteItemsTestCase {
+  protected function _prepareFixtures() {
+    parent::_prepareFixtures();
 
     $this->fixture('Class_Notice',
                    ['id' => 2,
@@ -84,15 +98,49 @@ class PhaseDeleteItemsTest extends  Class_Cosmogramme_Integration_PhaseTestCase
   }
 
 
-  protected function _getPreviousPhase() {
-    return (new Class_Cosmogramme_Integration_Phase(1))
-      ->beCron();
-  }
-
-
   /** @test */
   public function newPhaseShouldBe1Dot1() {
     $this->assertTrue($this->_phase->isId(1.1));
   }
+}
+
+
+
+class PhaseDeleteItemsFromANSIFileTest extends PhaseDeleteItemsTestCase {
+  protected function _prepareFixtures() {
+    parent::_prepareFixtures();
 
+    Class_IntProfilDonnees::find(102)
+      ->setAccents(Class_IntProfilDonnees::ENCODING_WINDOWS_ANSI)
+      ->setFormat(Class_IntProfilDonnees::FORMAT_TABBED_ASCII)
+      ->setAttributs([['type_doc' => [],
+                       'champ_cote' => ''],
+                      [],
+                      Class_IntProfilDonnees::FORMAT_TABBED_ASCII => ['champs' => 'code_barres']]);
+
+    Class_Cosmogramme_Integration::find(2)
+      ->setFichier('barcodes_deleted_ansi.txt');
+
+    $this->fixture('Class_Notice',
+                   ['id' => 2,
+                    'clef_alpha' => 'TINTIN',
+                    'exemplaires' => [
+                                      $this->fixture('Class_Exemplaire',
+                                                     ['id' => 3,
+                                                      'id_int_bib' => 2,
+                                                      'code_barres' => '02Ç9270194']),
+                                      $this->fixture('Class_Exemplaire',
+                                                     ['id' => 4,
+                                                      'id_int_bib' => 2,
+                                                      'code_barres' => 'X897'])
+                    ]
+                   ]);
+  }
+
+
+  /** @test */
+  public function firstItemShouldBeDeleted() {
+    Class_Exemplaire::clearCache();
+    $this->assertNull(Class_Exemplaire::find(3));
+  }
 }
\ No newline at end of file
diff --git a/tests/library/Class/Cosmogramme/Integration/barcodes_deleted_ansi.txt b/tests/library/Class/Cosmogramme/Integration/barcodes_deleted_ansi.txt
new file mode 100644
index 0000000000000000000000000000000000000000..8eb15b157d7525ffc303a6449a94c8665d6ae171
--- /dev/null
+++ b/tests/library/Class/Cosmogramme/Integration/barcodes_deleted_ansi.txt
@@ -0,0 +1,2 @@
+02Ç9270194    
+0147560194    
diff --git a/tests/library/Class/Import/Typo3Test.php b/tests/library/Class/Import/Typo3Test.php
index f26b41ce45ea811f9c4ee98aa1888955d27f1135..38efa977bfc335bb6322fe04589c0fb3b39e8d2c 100644
--- a/tests/library/Class/Import/Typo3Test.php
+++ b/tests/library/Class/Import/Typo3Test.php
@@ -271,7 +271,7 @@ class Import_Typo3ArticleTest extends Import_Typo3TestCase {
 
   /** @test */
   public function articleABordDuBateauPirateShouldBeInDomainAutres() {
-    $this->assertEquals(['Divers', 'NOS TOPS 5', 'Autres'],
+    $this->assertEquals(['Divers', 'Autres', 'NOS TOPS 5'],
                         $this->bateau_pirate->getDomaineLibelles());
   }
 
@@ -601,7 +601,7 @@ class Import_Typo3SitothequeTest extends Import_Typo3TestCase {
 
   /** @test */
   public function museoParcShouldBeInDomainAutres() {
-    $this->assertEquals(['Divers', 'NOS TOPS 5', 'Autres'],
+    $this->assertEquals(['Divers', 'Autres', 'NOS TOPS 5'],
                         $this->sito->getDomaineLibelles());
   }
 
diff --git a/tests/library/Class/SitothequeTest.php b/tests/library/Class/SitothequeTest.php
index 5711941b9cb4a106fd0d73fbc740000a4e6066ba..5d8250a6f4b8ecc132c3bf2d193cc4f84b7437cf 100644
--- a/tests/library/Class/SitothequeTest.php
+++ b/tests/library/Class/SitothequeTest.php
@@ -71,7 +71,6 @@ class SitothequeIndexAllTest extends Storm_Test_ModelTestCase {
                     'domaine_ids' => '1']);
 
     Class_Sitotheque::indexAll();
-    Class_Sitotheque::find(3)->setDomaineIds('1')->save();
   }
 
 
@@ -97,9 +96,18 @@ class SitothequeIndexAllTest extends Storm_Test_ModelTestCase {
   public function domainShouldHaveMySito2Record() {
     $this->assertNotNull(Class_NoticeDomain::findFirstBy(['record_alpha_key' => 'MYSITO2------10']));
   }
+
+
+  /** @test */
+  public function removingMyDomainShouldRemoveFacetInMySito() {
+    Class_Catalogue::find(1)->delete();
+    Class_Sitotheque::indexAll();
+    $this->assertNotContains('1', Class_Sitotheque::find(2)->getDomaineIdsAsArray());
+  }
 }
 
 
+
 class SitothequeUnindexTest extends Storm_Test_ModelTestCase {
   public function setUp() {
     parent::setUp();