| 
				
			 | 
			
			
				@@ -202,71 +202,64 @@ class ModerateControllerTest extends FunctionalTest 
			 | 
		
	
		
			
			| 
				202
			 | 
			
				202
			 | 
			
			
				     $this->disconnectUser(); 
			 | 
		
	
		
			
			| 
				203
			 | 
			
				203
			 | 
			
			
				     $this->connectUser('bob', 'toor'); 
			 | 
		
	
		
			
			| 
				204
			 | 
			
				204
			 | 
			
			
				      
			 | 
		
	
		
			
			| 
				205
			 | 
			
				
			 | 
			
			
				-    //// Sur la page de modération d'élément on peux voir l'élément dans la liste 
			 | 
		
	
		
			
			| 
				206
			 | 
			
				
			 | 
			
			
				-    //$this->crawler = $this->client->request('GET', $this->generateUrl('moderate_elements_index')); 
			 | 
		
	
		
			
			| 
				207
			 | 
			
				
			 | 
			
			
				-    //$this->isResponseSuccess(); 
			 | 
		
	
		
			
			| 
				208
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				209
			 | 
			
				
			 | 
			
			
				-    //$this->exist('li#mod_element_'.$element_ed->getId()); 
			 | 
		
	
		
			
			| 
				210
			 | 
			
				
			 | 
			
			
				-    //$this->exist('li#mod_element_'.$element_bab->getId()); 
			 | 
		
	
		
			
			| 
				211
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				212
			 | 
			
				
			 | 
			
			
				-    //// Première action, effectivement le partage ed cox doit être refusé par la modération 
			 | 
		
	
		
			
			| 
				213
			 | 
			
				
			 | 
			
			
				-    //$this->crawler = $this->client->request( 
			 | 
		
	
		
			
			| 
				214
			 | 
			
				
			 | 
			
			
				-    //  'GET',  
			 | 
		
	
		
			
			| 
				215
			 | 
			
				
			 | 
			
			
				-    //  $this->generateUrl('moderate_element_delete', array( 
			 | 
		
	
		
			
			| 
				216
			 | 
			
				
			 | 
			
			
				-    //    'element_id' => $element_ed->getId() 
			 | 
		
	
		
			
			| 
				217
			 | 
			
				
			 | 
			
			
				-    //  )), 
			 | 
		
	
		
			
			| 
				218
			 | 
			
				
			 | 
			
			
				-    //  array(),  
			 | 
		
	
		
			
			| 
				219
			 | 
			
				
			 | 
			
			
				-    //  array(),  
			 | 
		
	
		
			
			| 
				220
			 | 
			
				
			 | 
			
			
				-    //  array('HTTP_X-Requested-With' => 'XMLHttpRequest') 
			 | 
		
	
		
			
			| 
				221
			 | 
			
				
			 | 
			
			
				-    //); 
			 | 
		
	
		
			
			| 
				222
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				223
			 | 
			
				
			 | 
			
			
				-    //$this->isResponseSuccess(); 
			 | 
		
	
		
			
			| 
				224
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				225
			 | 
			
				
			 | 
			
			
				-    //$response = json_decode($this->client->getResponse()->getContent(), true); 
			 | 
		
	
		
			
			| 
				226
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals($response['status'], 'success'); 
			 | 
		
	
		
			
			| 
				227
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				228
			 | 
			
				
			 | 
			
			
				-    //$element_ed = $this->getDoctrine()->getRepository('MuzichCoreBundle:Element') 
			 | 
		
	
		
			
			| 
				229
			 | 
			
				
			 | 
			
			
				-    //  ->findOneByName('Ed Cox - La fanfare des teuffeurs (Hardcordian)') 
			 | 
		
	
		
			
			| 
				230
			 | 
			
				
			 | 
			
			
				-    //; 
			 | 
		
	
		
			
			| 
				231
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals(true, is_null($element_ed)); 
			 | 
		
	
		
			
			| 
				232
			 | 
			
				
			 | 
			
			
				-    //// Condéquences, le proprio (bux) vois son compteur d'élément modéré augmenter 
			 | 
		
	
		
			
			| 
				233
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals($bux_moderated_element_count+1, $this->getUser('bux')->getModeratedElementCount()); 
			 | 
		
	
		
			
			| 
				234
			 | 
			
				
			 | 
			
			
				-    //// Le compteur de mauvai signalemetn de paul n'a pas bougé par contre. 
			 | 
		
	
		
			
			| 
				235
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals($paul_bad_reports_count, $this->getUser('paul')->getBadReportCount()); 
			 | 
		
	
		
			
			| 
				236
			 | 
			
				
			 | 
			
			
				-    //// Ni celui de joelle 
			 | 
		
	
		
			
			| 
				237
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals($joelle_bad_reports_count, $this->getUser('joelle')->getBadReportCount()); 
			 | 
		
	
		
			
			| 
				238
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				239
			 | 
			
				
			 | 
			
			
				-    //// Deuxième action on considère que l'autre élément n'a pas a être refusé 
			 | 
		
	
		
			
			| 
				240
			 | 
			
				
			 | 
			
			
				-    //$this->crawler = $this->client->request( 
			 | 
		
	
		
			
			| 
				241
			 | 
			
				
			 | 
			
			
				-    //  'GET',  
			 | 
		
	
		
			
			| 
				242
			 | 
			
				
			 | 
			
			
				-    //  $this->generateUrl('moderate_element_clean', array( 
			 | 
		
	
		
			
			| 
				243
			 | 
			
				
			 | 
			
			
				-    //    'element_id' => $element_bab->getId() 
			 | 
		
	
		
			
			| 
				244
			 | 
			
				
			 | 
			
			
				-    //  )), 
			 | 
		
	
		
			
			| 
				245
			 | 
			
				
			 | 
			
			
				-    //  array(),  
			 | 
		
	
		
			
			| 
				246
			 | 
			
				
			 | 
			
			
				-    //  array(),  
			 | 
		
	
		
			
			| 
				247
			 | 
			
				
			 | 
			
			
				-    //  array('HTTP_X-Requested-With' => 'XMLHttpRequest') 
			 | 
		
	
		
			
			| 
				248
			 | 
			
				
			 | 
			
			
				-    //); 
			 | 
		
	
		
			
			| 
				249
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				250
			 | 
			
				
			 | 
			
			
				-    //$this->isResponseSuccess(); 
			 | 
		
	
		
			
			| 
				251
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				252
			 | 
			
				
			 | 
			
			
				-    //$response = json_decode($this->client->getResponse()->getContent(), true); 
			 | 
		
	
		
			
			| 
				253
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals($response['status'], 'success'); 
			 | 
		
	
		
			
			| 
				254
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				255
			 | 
			
				
			 | 
			
			
				-    //$element_bab = $this->getDoctrine()->getRepository('MuzichCoreBundle:Element') 
			 | 
		
	
		
			
			| 
				256
			 | 
			
				
			 | 
			
			
				-    //  ->findOneByName('Babylon Pression - Des Tasers et des Pauvres') 
			 | 
		
	
		
			
			| 
				257
			 | 
			
				
			 | 
			
			
				-    //; 
			 | 
		
	
		
			
			| 
				258
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				259
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals(false, is_null($element_bab)); 
			 | 
		
	
		
			
			| 
				260
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals($element_bab->getCountReport(), 0); 
			 | 
		
	
		
			
			| 
				261
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals($element_bab->getReportIds(), null); 
			 | 
		
	
		
			
			| 
				262
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				263
			 | 
			
				
			 | 
			
			
				-    //// Condéquences, le proprio (bux) ne vois pas son compteur d'élément modéré augmenter encore 
			 | 
		
	
		
			
			| 
				264
			 | 
			
				
			 | 
			
			
				-    ////                                              +1 car c'est pour la modo juste avant 
			 | 
		
	
		
			
			| 
				265
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals($bux_moderated_element_count+1, $this->getUser('bux')->getModeratedElementCount()); 
			 | 
		
	
		
			
			| 
				266
			 | 
			
				
			 | 
			
			
				-    //// Le compteur de mauvais signalemetn de paul a augmenter d'un 
			 | 
		
	
		
			
			| 
				267
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals($paul_bad_reports_count+1, $this->getUser('paul')->getBadReportCount()); 
			 | 
		
	
		
			
			| 
				268
			 | 
			
				
			 | 
			
			
				-    //// Celui de joelle non, elle n'a rien a voir avec ce signalement 
			 | 
		
	
		
			
			| 
				269
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals($joelle_bad_reports_count, $this->getUser('joelle')->getBadReportCount()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				205
			 | 
			
			
				+    /* 
			 | 
		
	
		
			
			| 
				
			 | 
			
				206
			 | 
			
			
				+     * 
			 | 
		
	
		
			
			| 
				
			 | 
			
				207
			 | 
			
			
				+     * 
			 | 
		
	
		
			
			| 
				
			 | 
			
				208
			 | 
			
			
				+     * 
			 | 
		
	
		
			
			| 
				
			 | 
			
				209
			 | 
			
			
				+     */ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				210
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				211
			 | 
			
			
				+    // Sur la page de modération d'élément on peux voir l'élément dans la liste 
			 | 
		
	
		
			
			| 
				
			 | 
			
				212
			 | 
			
			
				+    $this->crawler = $this->client->request('GET', $this->generateUrl('Muzich_AdminBundle_Moderate_element_list')); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				213
			 | 
			
			
				+    $this->isResponseSuccess(); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				214
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				215
			 | 
			
			
				+    $this->exist('body:contains("'.$element_ed->getName().'")'); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				216
			 | 
			
			
				+    $this->exist('body:contains("'.$element_bab->getName().'")'); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				217
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				218
			 | 
			
			
				+    $this->crawler = $this->client->request('GET', $this->generateUrl( 
			 | 
		
	
		
			
			| 
				
			 | 
			
				219
			 | 
			
			
				+      'Muzich_AdminBundle_Moderate_element_refuse', 
			 | 
		
	
		
			
			| 
				
			 | 
			
				220
			 | 
			
			
				+      array('pk' => $element_ed->getId()) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				221
			 | 
			
			
				+    )); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				222
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				223
			 | 
			
			
				+    $this->isResponseRedirection(); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				224
			 | 
			
			
				+    $this->followRedirection(); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				225
			 | 
			
			
				+    $this->isResponseSuccess(); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				226
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				227
			 | 
			
			
				+    $element_ed = $this->getDoctrine()->getRepository('MuzichCoreBundle:Element') 
			 | 
		
	
		
			
			| 
				
			 | 
			
				228
			 | 
			
			
				+      ->findOneByName('Ed Cox - La fanfare des teuffeurs (Hardcordian)') 
			 | 
		
	
		
			
			| 
				
			 | 
			
				229
			 | 
			
			
				+    ; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				230
			 | 
			
			
				+    $this->assertEquals(true, is_null($element_ed)); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				231
			 | 
			
			
				+    // Condéquences, le proprio (bux) vois son compteur d'élément modéré augmenter 
			 | 
		
	
		
			
			| 
				
			 | 
			
				232
			 | 
			
			
				+    $this->assertEquals($bux_moderated_element_count+1, $this->getUser('bux')->getModeratedElementCount()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				233
			 | 
			
			
				+    // Le compteur de mauvai signalemetn de paul n'a pas bougé par contre. 
			 | 
		
	
		
			
			| 
				
			 | 
			
				234
			 | 
			
			
				+    $this->assertEquals($paul_bad_reports_count, $this->getUser('paul')->getBadReportCount()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				235
			 | 
			
			
				+    // Ni celui de joelle 
			 | 
		
	
		
			
			| 
				
			 | 
			
				236
			 | 
			
			
				+    $this->assertEquals($joelle_bad_reports_count, $this->getUser('joelle')->getBadReportCount()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				237
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				238
			 | 
			
			
				+    // Deuxième action on considère que l'autre élément n'a pas a être refusé 
			 | 
		
	
		
			
			| 
				
			 | 
			
				239
			 | 
			
			
				+    $this->crawler = $this->client->request('GET', $this->generateUrl( 
			 | 
		
	
		
			
			| 
				
			 | 
			
				240
			 | 
			
			
				+      'Muzich_AdminBundle_Moderate_element_accept', 
			 | 
		
	
		
			
			| 
				
			 | 
			
				241
			 | 
			
			
				+      array('pk' => $element_bab->getId()) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				242
			 | 
			
			
				+    )); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				243
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				244
			 | 
			
			
				+    $this->isResponseRedirection(); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				245
			 | 
			
			
				+    $this->followRedirection(); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				246
			 | 
			
			
				+    $this->isResponseSuccess(); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				247
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				248
			 | 
			
			
				+    $element_bab = $this->getDoctrine()->getRepository('MuzichCoreBundle:Element') 
			 | 
		
	
		
			
			| 
				
			 | 
			
				249
			 | 
			
			
				+      ->findOneByName('Babylon Pression - Des Tasers et des Pauvres') 
			 | 
		
	
		
			
			| 
				
			 | 
			
				250
			 | 
			
			
				+    ; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				251
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				252
			 | 
			
			
				+    $this->assertEquals(false, is_null($element_bab)); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				253
			 | 
			
			
				+    $this->assertEquals($element_bab->getCountReport(), 0); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				254
			 | 
			
			
				+    $this->assertEquals($element_bab->getReportIds(), null); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				255
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				256
			 | 
			
			
				+    // Condéquences, le proprio (bux) ne vois pas son compteur d'élément modéré augmenter encore 
			 | 
		
	
		
			
			| 
				
			 | 
			
				257
			 | 
			
			
				+    //                                              +1 car c'est pour la modo juste avant 
			 | 
		
	
		
			
			| 
				
			 | 
			
				258
			 | 
			
			
				+    $this->assertEquals($bux_moderated_element_count+1, $this->getUser('bux')->getModeratedElementCount()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				259
			 | 
			
			
				+    // Le compteur de mauvais signalemetn de paul a augmenter d'un 
			 | 
		
	
		
			
			| 
				
			 | 
			
				260
			 | 
			
			
				+    $this->assertEquals($paul_bad_reports_count+1, $this->getUser('paul')->getBadReportCount()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				261
			 | 
			
			
				+    // Celui de joelle non, elle n'a rien a voir avec ce signalement 
			 | 
		
	
		
			
			| 
				
			 | 
			
				262
			 | 
			
			
				+    $this->assertEquals($joelle_bad_reports_count, $this->getUser('joelle')->getBadReportCount()); 
			 | 
		
	
		
			
			| 
				270
			 | 
			
				263
			 | 
			
			
				   } 
			 | 
		
	
		
			
			| 
				271
			 | 
			
				264
			 | 
			
			
				    
			 | 
		
	
		
			
			| 
				272
			 | 
			
				265
			 | 
			
			
				   /** 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -282,7 +275,7 @@ class ModerateControllerTest extends FunctionalTest 
			 | 
		
	
		
			
			| 
				282
			 | 
			
				275
			 | 
			
			
				       $this->client,  
			 | 
		
	
		
			
			| 
				283
			 | 
			
				276
			 | 
			
			
				       "fos:user:promote bux ROLE_ADMIN" 
			 | 
		
	
		
			
			| 
				284
			 | 
			
				277
			 | 
			
			
				     ); 
			 | 
		
	
		
			
			| 
				285
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				
			 | 
			
				278
			 | 
			
			
				+   
			 | 
		
	
		
			
			| 
				286
			 | 
			
				279
			 | 
			
			
				     /** 
			 | 
		
	
		
			
			| 
				287
			 | 
			
				280
			 | 
			
			
				      * Scénario: joelle signale deux commentaires: un de bux et un de paul 
			 | 
		
	
		
			
			| 
				288
			 | 
			
				281
			 | 
			
			
				      * sur l'élément d'ed cox. 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -380,86 +373,71 @@ class ModerateControllerTest extends FunctionalTest 
			 | 
		
	
		
			
			| 
				380
			 | 
			
				373
			 | 
			
			
				     $this->connectUser('bux', 'toor'); 
			 | 
		
	
		
			
			| 
				381
			 | 
			
				374
			 | 
			
			
				     $bux = $this->getUser(); 
			 | 
		
	
		
			
			| 
				382
			 | 
			
				375
			 | 
			
			
				      
			 | 
		
	
		
			
			| 
				383
			 | 
			
				
			 | 
			
			
				-    //// bux ouvre la page de modération des commentaires 
			 | 
		
	
		
			
			| 
				384
			 | 
			
				
			 | 
			
			
				-    //$this->crawler = $this->client->request('GET', $this->generateUrl('moderate_comments_index')); 
			 | 
		
	
		
			
			| 
				385
			 | 
			
				
			 | 
			
			
				-    //$this->isResponseSuccess(); 
			 | 
		
	
		
			
			| 
				386
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				387
			 | 
			
				
			 | 
			
			
				-    //// On voit les deux commentaires signalés dans la liste 
			 | 
		
	
		
			
			| 
				388
			 | 
			
				
			 | 
			
			
				-    //$this->exist('li.comment:contains("C\'est trop bon hein ?")'); 
			 | 
		
	
		
			
			| 
				389
			 | 
			
				
			 | 
			
			
				-    //$this->exist('li.comment:contains("C\'est pas mal en effet")'); 
			 | 
		
	
		
			
			| 
				390
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				391
			 | 
			
				
			 | 
			
			
				-    //// Refus de celui de bux 
			 | 
		
	
		
			
			| 
				392
			 | 
			
				
			 | 
			
			
				-    //$this->crawler = $this->client->request( 
			 | 
		
	
		
			
			| 
				393
			 | 
			
				
			 | 
			
			
				-    //  'GET',  
			 | 
		
	
		
			
			| 
				394
			 | 
			
				
			 | 
			
			
				-    //  $this->generateUrl('moderate_comment_refuse', array( 
			 | 
		
	
		
			
			| 
				395
			 | 
			
				
			 | 
			
			
				-    //    'element_id' => $element->getId(), 
			 | 
		
	
		
			
			| 
				396
			 | 
			
				
			 | 
			
			
				-    //    'date'       => $comment_bux['d'] 
			 | 
		
	
		
			
			| 
				397
			 | 
			
				
			 | 
			
			
				-    //  )), 
			 | 
		
	
		
			
			| 
				398
			 | 
			
				
			 | 
			
			
				-    //  array(),  
			 | 
		
	
		
			
			| 
				399
			 | 
			
				
			 | 
			
			
				-    //  array(),  
			 | 
		
	
		
			
			| 
				400
			 | 
			
				
			 | 
			
			
				-    //  array('HTTP_X-Requested-With' => 'XMLHttpRequest') 
			 | 
		
	
		
			
			| 
				401
			 | 
			
				
			 | 
			
			
				-    //); 
			 | 
		
	
		
			
			| 
				402
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				403
			 | 
			
				
			 | 
			
			
				-    //$this->isResponseSuccess(); 
			 | 
		
	
		
			
			| 
				404
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				405
			 | 
			
				
			 | 
			
			
				-    //$response = json_decode($this->client->getResponse()->getContent(), true); 
			 | 
		
	
		
			
			| 
				406
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals($response['status'], 'success'); 
			 | 
		
	
		
			
			| 
				407
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				408
			 | 
			
				
			 | 
			
			
				-    //// Le compteur de mauvais comportement de bux a été incrémenté 
			 | 
		
	
		
			
			| 
				409
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals($bux_moderated_element_count+1, $this->getUser('bux')->getModeratedCommentCount()); 
			 | 
		
	
		
			
			| 
				410
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				411
			 | 
			
				
			 | 
			
			
				-    //$joelle = $this->getUser('joelle'); 
			 | 
		
	
		
			
			| 
				412
			 | 
			
				
			 | 
			
			
				-    //// Le compteur de faux signalement de joelle ne bouge pas. 
			 | 
		
	
		
			
			| 
				413
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals($joelle_fake_alerts, $joelle->getBadReportCount()); 
			 | 
		
	
		
			
			| 
				414
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				415
			 | 
			
				
			 | 
			
			
				-    //// la base est a jour 
			 | 
		
	
		
			
			| 
				416
			 | 
			
				
			 | 
			
			
				-    //$element = $this->getDoctrine()->getRepository('MuzichCoreBundle:Element') 
			 | 
		
	
		
			
			| 
				417
			 | 
			
				
			 | 
			
			
				-    //  ->findOneByName('Ed Cox - La fanfare des teuffeurs (Hardcordian)') 
			 | 
		
	
		
			
			| 
				418
			 | 
			
				
			 | 
			
			
				-    //; 
			 | 
		
	
		
			
			| 
				419
			 | 
			
				
			 | 
			
			
				-    //$cm = new CommentsManager($element->getComments()); 
			 | 
		
	
		
			
			| 
				420
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				421
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals(1, $cm->countCommentAlert()); 
			 | 
		
	
		
			
			| 
				422
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals(1, $element->getCountCommentReport()); 
			 | 
		
	
		
			
			| 
				423
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				424
			 | 
			
				
			 | 
			
			
				-    //// Clean de celui de paul 
			 | 
		
	
		
			
			| 
				425
			 | 
			
				
			 | 
			
			
				-    //$this->crawler = $this->client->request( 
			 | 
		
	
		
			
			| 
				426
			 | 
			
				
			 | 
			
			
				-    //  'GET',  
			 | 
		
	
		
			
			| 
				427
			 | 
			
				
			 | 
			
			
				-    //  $this->generateUrl('moderate_comment_clean', array( 
			 | 
		
	
		
			
			| 
				428
			 | 
			
				
			 | 
			
			
				-    //    'element_id' => $element->getId(), 
			 | 
		
	
		
			
			| 
				429
			 | 
			
				
			 | 
			
			
				-    //    'date'       => $comment_paul['d'] 
			 | 
		
	
		
			
			| 
				430
			 | 
			
				
			 | 
			
			
				-    //  )), 
			 | 
		
	
		
			
			| 
				431
			 | 
			
				
			 | 
			
			
				-    //  array(),  
			 | 
		
	
		
			
			| 
				432
			 | 
			
				
			 | 
			
			
				-    //  array(),  
			 | 
		
	
		
			
			| 
				433
			 | 
			
				
			 | 
			
			
				-    //  array('HTTP_X-Requested-With' => 'XMLHttpRequest') 
			 | 
		
	
		
			
			| 
				434
			 | 
			
				
			 | 
			
			
				-    //); 
			 | 
		
	
		
			
			| 
				435
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				436
			 | 
			
				
			 | 
			
			
				-    //$this->isResponseSuccess(); 
			 | 
		
	
		
			
			| 
				437
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				438
			 | 
			
				
			 | 
			
			
				-    //$response = json_decode($this->client->getResponse()->getContent(), true); 
			 | 
		
	
		
			
			| 
				439
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals($response['status'], 'success'); 
			 | 
		
	
		
			
			| 
				440
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				441
			 | 
			
				
			 | 
			
			
				-    //// la base est a jour 
			 | 
		
	
		
			
			| 
				442
			 | 
			
				
			 | 
			
			
				-    //$element = $this->getDoctrine()->getRepository('MuzichCoreBundle:Element') 
			 | 
		
	
		
			
			| 
				443
			 | 
			
				
			 | 
			
			
				-    //  ->findOneByName('Ed Cox - La fanfare des teuffeurs (Hardcordian)') 
			 | 
		
	
		
			
			| 
				444
			 | 
			
				
			 | 
			
			
				-    //; 
			 | 
		
	
		
			
			| 
				445
			 | 
			
				
			 | 
			
			
				-    //$cm = new CommentsManager($element->getComments()); 
			 | 
		
	
		
			
			| 
				446
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				447
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals(0, $cm->countCommentAlert()); 
			 | 
		
	
		
			
			| 
				448
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals(0, $element->getCountCommentReport()); 
			 | 
		
	
		
			
			| 
				449
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				450
			 | 
			
				
			 | 
			
			
				-    //// Mais comme joelle a signalé un commentaire considéré comme ok par la modération 
			 | 
		
	
		
			
			| 
				451
			 | 
			
				
			 | 
			
			
				-    //// joelle vois son compteur de faux signalement incrémenté 
			 | 
		
	
		
			
			| 
				452
			 | 
			
				
			 | 
			
			
				-    //$joelle = $this->getUser('joelle'); 
			 | 
		
	
		
			
			| 
				453
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals($joelle_fake_alerts+1, $joelle->getBadReportCount()); 
			 | 
		
	
		
			
			| 
				454
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				455
			 | 
			
				
			 | 
			
			
				-    //// Le compteur de mauvais comportement de paul n'a pas bougé 
			 | 
		
	
		
			
			| 
				456
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals($paul_moderated_element_count, $this->getUser('paul')->getModeratedCommentCount()); 
			 | 
		
	
		
			
			| 
				457
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				458
			 | 
			
				
			 | 
			
			
				-    //// Et si on se rend sur la page home, le commentaire de bux a disparu 
			 | 
		
	
		
			
			| 
				459
			 | 
			
				
			 | 
			
			
				-    //$this->crawler = $this->client->request('GET', $this->generateUrl('home')); 
			 | 
		
	
		
			
			| 
				460
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				461
			 | 
			
				
			 | 
			
			
				-    //$this->exist('li.comment:contains("C\'est pas mal en effet")'); 
			 | 
		
	
		
			
			| 
				462
			 | 
			
				
			 | 
			
			
				-    //$this->notExist('li.comment:contains("C\'est trop bon hein ?")'); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				376
			 | 
			
			
				+    // bux ouvre la page de modération des commentaires 
			 | 
		
	
		
			
			| 
				
			 | 
			
				377
			 | 
			
			
				+    $this->crawler = $this->client->request('GET', $this->generateUrl('Muzich_AdminBundle_Moderate_comment_list')); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				378
			 | 
			
			
				+    $this->isResponseSuccess(); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				379
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				380
			 | 
			
			
				+    // On voit les deux commentaires signalés dans la liste 
			 | 
		
	
		
			
			| 
				
			 | 
			
				381
			 | 
			
			
				+    $this->exist('body:contains("C\'est trop bon hein ?")'); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				382
			 | 
			
			
				+    $this->exist('body:contains("C\'est pas mal en effet")'); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				383
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				384
			 | 
			
			
				+    // Refus de celui de bux 
			 | 
		
	
		
			
			| 
				
			 | 
			
				385
			 | 
			
			
				+    $this->crawler = $this->client->request('GET', $this->generateUrl( 
			 | 
		
	
		
			
			| 
				
			 | 
			
				386
			 | 
			
			
				+      'Muzich_AdminBundle_Moderate_comment_refuse', 
			 | 
		
	
		
			
			| 
				
			 | 
			
				387
			 | 
			
			
				+      array('element_id' => $element->getId(), 'date' => $comment_bux['d']) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				388
			 | 
			
			
				+    )); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				389
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				390
			 | 
			
			
				+    $this->isResponseRedirection(); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				391
			 | 
			
			
				+    $this->followRedirection(); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				392
			 | 
			
			
				+    $this->isResponseSuccess(); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				393
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				394
			 | 
			
			
				+    // Le compteur de mauvais comportement de bux a été incrémenté 
			 | 
		
	
		
			
			| 
				
			 | 
			
				395
			 | 
			
			
				+    $this->assertEquals($bux_moderated_element_count+1, $this->getUser('bux')->getModeratedCommentCount()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				396
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				397
			 | 
			
			
				+    $joelle = $this->getUser('joelle'); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				398
			 | 
			
			
				+    // Le compteur de faux signalement de joelle ne bouge pas. 
			 | 
		
	
		
			
			| 
				
			 | 
			
				399
			 | 
			
			
				+    $this->assertEquals($joelle_fake_alerts, $joelle->getBadReportCount()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				400
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				401
			 | 
			
			
				+    // la base est a jour 
			 | 
		
	
		
			
			| 
				
			 | 
			
				402
			 | 
			
			
				+    $element = $this->getDoctrine()->getRepository('MuzichCoreBundle:Element') 
			 | 
		
	
		
			
			| 
				
			 | 
			
				403
			 | 
			
			
				+      ->findOneByName('Ed Cox - La fanfare des teuffeurs (Hardcordian)') 
			 | 
		
	
		
			
			| 
				
			 | 
			
				404
			 | 
			
			
				+    ; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				405
			 | 
			
			
				+    $cm = new CommentsManager($element->getComments()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				406
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				407
			 | 
			
			
				+    $this->assertEquals(1, $cm->countCommentAlert()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				408
			 | 
			
			
				+    $this->assertEquals(1, $element->getCountCommentReport()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				409
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				410
			 | 
			
			
				+    $this->crawler = $this->client->request('GET', $this->generateUrl( 
			 | 
		
	
		
			
			| 
				
			 | 
			
				411
			 | 
			
			
				+      'Muzich_AdminBundle_Moderate_comment_accept', 
			 | 
		
	
		
			
			| 
				
			 | 
			
				412
			 | 
			
			
				+      array('element_id' => $element->getId(), 'date' => $comment_paul['d']) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				413
			 | 
			
			
				+    )); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				414
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				415
			 | 
			
			
				+    $this->isResponseRedirection(); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				416
			 | 
			
			
				+    $this->followRedirection(); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				417
			 | 
			
			
				+    $this->isResponseSuccess(); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				418
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				419
			 | 
			
			
				+    // la base est a jour 
			 | 
		
	
		
			
			| 
				
			 | 
			
				420
			 | 
			
			
				+    $element = $this->getDoctrine()->getRepository('MuzichCoreBundle:Element') 
			 | 
		
	
		
			
			| 
				
			 | 
			
				421
			 | 
			
			
				+      ->findOneByName('Ed Cox - La fanfare des teuffeurs (Hardcordian)') 
			 | 
		
	
		
			
			| 
				
			 | 
			
				422
			 | 
			
			
				+    ; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				423
			 | 
			
			
				+    $cm = new CommentsManager($element->getComments()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				424
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				425
			 | 
			
			
				+    $this->assertEquals(0, $cm->countCommentAlert()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				426
			 | 
			
			
				+    $this->assertEquals(0, $element->getCountCommentReport()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				427
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				428
			 | 
			
			
				+    // Mais comme joelle a signalé un commentaire considéré comme ok par la modération 
			 | 
		
	
		
			
			| 
				
			 | 
			
				429
			 | 
			
			
				+    // joelle vois son compteur de faux signalement incrémenté 
			 | 
		
	
		
			
			| 
				
			 | 
			
				430
			 | 
			
			
				+    $joelle = $this->getUser('joelle'); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				431
			 | 
			
			
				+    $this->assertEquals($joelle_fake_alerts+1, $joelle->getBadReportCount()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				432
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				433
			 | 
			
			
				+    // Le compteur de mauvais comportement de paul n'a pas bougé 
			 | 
		
	
		
			
			| 
				
			 | 
			
				434
			 | 
			
			
				+    $this->assertEquals($paul_moderated_element_count, $this->getUser('paul')->getModeratedCommentCount()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				435
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				436
			 | 
			
			
				+    // Et si on se rend sur la page home, le commentaire de bux a disparu 
			 | 
		
	
		
			
			| 
				
			 | 
			
				437
			 | 
			
			
				+    $this->crawler = $this->client->request('GET', $this->generateUrl('home')); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				438
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				439
			 | 
			
			
				+    $this->exist('li.comment:contains("C\'est pas mal en effet")'); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				440
			 | 
			
			
				+    $this->notExist('li.comment:contains("C\'est trop bon hein ?")'); 
			 | 
		
	
		
			
			| 
				463
			 | 
			
				441
			 | 
			
			
				   } 
			 | 
		
	
		
			
			| 
				464
			 | 
			
				442
			 | 
			
			
				    
			 | 
		
	
		
			
			| 
				465
			 | 
			
				443
			 | 
			
			
				   /** 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -505,7 +483,7 @@ class ModerateControllerTest extends FunctionalTest 
			 | 
		
	
		
			
			| 
				505
			 | 
			
				483
			 | 
			
			
				         array($Tag0001->getId()), 
			 | 
		
	
		
			
			| 
				506
			 | 
			
				484
			 | 
			
			
				               null, true 
			 | 
		
	
		
			
			| 
				507
			 | 
			
				485
			 | 
			
			
				       ); 
			 | 
		
	
		
			
			| 
				508
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				
			 | 
			
				486
			 | 
			
			
				+   
			 | 
		
	
		
			
			| 
				509
			 | 
			
				487
			 | 
			
			
				       $this->isResponseRedirection(); 
			 | 
		
	
		
			
			| 
				510
			 | 
			
				488
			 | 
			
			
				       $this->followRedirection(); 
			 | 
		
	
		
			
			| 
				511
			 | 
			
				489
			 | 
			
			
				       $this->isResponseSuccess(); 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -533,7 +511,7 @@ class ModerateControllerTest extends FunctionalTest 
			 | 
		
	
		
			
			| 
				533
			 | 
			
				511
			 | 
			
			
				         array($Tag0000->getId()), 
			 | 
		
	
		
			
			| 
				534
			 | 
			
				512
			 | 
			
			
				               null, true 
			 | 
		
	
		
			
			| 
				535
			 | 
			
				513
			 | 
			
			
				       ); 
			 | 
		
	
		
			
			| 
				536
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				
			 | 
			
				514
			 | 
			
			
				+   
			 | 
		
	
		
			
			| 
				537
			 | 
			
				515
			 | 
			
			
				       $this->isResponseRedirection(); 
			 | 
		
	
		
			
			| 
				538
			 | 
			
				516
			 | 
			
			
				       $this->followRedirection(); 
			 | 
		
	
		
			
			| 
				539
			 | 
			
				517
			 | 
			
			
				       $this->isResponseSuccess(); 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -556,7 +534,7 @@ class ModerateControllerTest extends FunctionalTest 
			 | 
		
	
		
			
			| 
				556
			 | 
			
				534
			 | 
			
			
				         array($Tag0002->getId()), 
			 | 
		
	
		
			
			| 
				557
			 | 
			
				535
			 | 
			
			
				               null, true 
			 | 
		
	
		
			
			| 
				558
			 | 
			
				536
			 | 
			
			
				       ); 
			 | 
		
	
		
			
			| 
				559
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				
			 | 
			
				537
			 | 
			
			
				+   
			 | 
		
	
		
			
			| 
				560
			 | 
			
				538
			 | 
			
			
				       $this->isResponseRedirection(); 
			 | 
		
	
		
			
			| 
				561
			 | 
			
				539
			 | 
			
			
				       $this->followRedirection(); 
			 | 
		
	
		
			
			| 
				562
			 | 
			
				540
			 | 
			
			
				       $this->isResponseSuccess(); 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -571,116 +549,80 @@ class ModerateControllerTest extends FunctionalTest 
			 | 
		
	
		
			
			| 
				571
			 | 
			
				549
			 | 
			
			
				     $this->disconnectUser(); 
			 | 
		
	
		
			
			| 
				572
			 | 
			
				550
			 | 
			
			
				     $this->connectUser('bux', 'toor'); 
			 | 
		
	
		
			
			| 
				573
			 | 
			
				551
			 | 
			
			
				      
			 | 
		
	
		
			
			| 
				574
			 | 
			
				
			 | 
			
			
				-    //// On se rend sur la page de moderation des tags 
			 | 
		
	
		
			
			| 
				575
			 | 
			
				
			 | 
			
			
				-    //$this->crawler = $this->client->request('GET', $this->generateUrl('MuzichAdminBundle_moderate_tags')); 
			 | 
		
	
		
			
			| 
				576
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				577
			 | 
			
				
			 | 
			
			
				-    //// On peux voir les tags  
			 | 
		
	
		
			
			| 
				578
			 | 
			
				
			 | 
			
			
				-    //$this->exist('span.name:contains("Tag0000")'); 
			 | 
		
	
		
			
			| 
				579
			 | 
			
				
			 | 
			
			
				-    //$this->exist('span.name:contains("Tag0001")'); 
			 | 
		
	
		
			
			| 
				580
			 | 
			
				
			 | 
			
			
				-    //$this->exist('span.name:contains("Tag0002")'); 
			 | 
		
	
		
			
			| 
				581
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				582
			 | 
			
				
			 | 
			
			
				-    ///* 
			 | 
		
	
		
			
			| 
				583
			 | 
			
				
			 | 
			
			
				-    // * Etapes: 
			 | 
		
	
		
			
			| 
				584
			 | 
			
				
			 | 
			
			
				-    // *  
			 | 
		
	
		
			
			| 
				585
			 | 
			
				
			 | 
			
			
				-    // * On refuse Tag0000 
			 | 
		
	
		
			
			| 
				586
			 | 
			
				
			 | 
			
			
				-    // *  => L'élément lié a ce tag ne l'a plus 
			 | 
		
	
		
			
			| 
				587
			 | 
			
				
			 | 
			
			
				-    // *  => Le ou les users qui l'on demandé sont incrementé 
			 | 
		
	
		
			
			| 
				588
			 | 
			
				
			 | 
			
			
				-    // * On accepte Tag0001 
			 | 
		
	
		
			
			| 
				589
			 | 
			
				
			 | 
			
			
				-    // *  => L'élément lié a ce tag l'a toujours 
			 | 
		
	
		
			
			| 
				590
			 | 
			
				
			 | 
			
			
				-    // * On remplace Tag0002 par tribe 
			 | 
		
	
		
			
			| 
				591
			 | 
			
				
			 | 
			
			
				-    // *  => L'élément lié a ce tag a le nouveau 
			 | 
		
	
		
			
			| 
				592
			 | 
			
				
			 | 
			
			
				-    // *  => Les users qui l'ont demandé ne sont pas pénalisés  
			 | 
		
	
		
			
			| 
				593
			 | 
			
				
			 | 
			
			
				-    // */ 
			 | 
		
	
		
			
			| 
				594
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				595
			 | 
			
				
			 | 
			
			
				-    //// On refuse Tag0000 
			 | 
		
	
		
			
			| 
				596
			 | 
			
				
			 | 
			
			
				-    //$this->crawler = $this->client->request( 
			 | 
		
	
		
			
			| 
				597
			 | 
			
				
			 | 
			
			
				-    //  'GET',  
			 | 
		
	
		
			
			| 
				598
			 | 
			
				
			 | 
			
			
				-    //  $this->generateUrl('MuzichAdminBundle_moderate_tags_refuse_tag', array( 
			 | 
		
	
		
			
			| 
				599
			 | 
			
				
			 | 
			
			
				-    //    'tag_id' => $Tag0000->getId() 
			 | 
		
	
		
			
			| 
				600
			 | 
			
				
			 | 
			
			
				-    //  )), 
			 | 
		
	
		
			
			| 
				601
			 | 
			
				
			 | 
			
			
				-    //  array(),  
			 | 
		
	
		
			
			| 
				602
			 | 
			
				
			 | 
			
			
				-    //  array(),  
			 | 
		
	
		
			
			| 
				603
			 | 
			
				
			 | 
			
			
				-    //  array('HTTP_X-Requested-With' => 'XMLHttpRequest') 
			 | 
		
	
		
			
			| 
				604
			 | 
			
				
			 | 
			
			
				-    //); 
			 | 
		
	
		
			
			| 
				605
			 | 
			
				
			 | 
			
			
				-    //$this->isResponseSuccess(); 
			 | 
		
	
		
			
			| 
				606
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				607
			 | 
			
				
			 | 
			
			
				-    //// Le tag n'est plus 
			 | 
		
	
		
			
			| 
				608
			 | 
			
				
			 | 
			
			
				-    //$Tag0000 = $this->getDoctrine()->getRepository('MuzichCoreBundle:Tag')->findOneByName('Tag0000'); 
			 | 
		
	
		
			
			| 
				609
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals(true, is_null($Tag0000)); 
			 | 
		
	
		
			
			| 
				610
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				611
			 | 
			
				
			 | 
			
			
				-    //// L'élément ne dois plus l'avoir comme tag 
			 | 
		
	
		
			
			| 
				612
			 | 
			
				
			 | 
			
			
				-    //$element = $this->getDoctrine()->getRepository('MuzichCoreBundle:Element') 
			 | 
		
	
		
			
			| 
				613
			 | 
			
				
			 | 
			
			
				-    //  ->findOneByName('Lelement de tag0000') 
			 | 
		
	
		
			
			| 
				614
			 | 
			
				
			 | 
			
			
				-    //; 
			 | 
		
	
		
			
			| 
				615
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				616
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals('[]', $element->getTagsIdsJson()); 
			 | 
		
	
		
			
			| 
				617
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				618
			 | 
			
				
			 | 
			
			
				-    //// les utilisateurs ayant demandé ce tag ont été pénalisés 
			 | 
		
	
		
			
			| 
				619
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals($paul_moderated_tags_count+1, $this->getUser('paul')->getModeratedTagCount()); 
			 | 
		
	
		
			
			| 
				620
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals($joelle_moderated_tags_count+1, $this->getUser('joelle')->getModeratedTagCount()); 
			 | 
		
	
		
			
			| 
				621
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				622
			 | 
			
				
			 | 
			
			
				-    //// On accepte Tag0001 
			 | 
		
	
		
			
			| 
				623
			 | 
			
				
			 | 
			
			
				-    //$this->crawler = $this->client->request( 
			 | 
		
	
		
			
			| 
				624
			 | 
			
				
			 | 
			
			
				-    //  'GET',  
			 | 
		
	
		
			
			| 
				625
			 | 
			
				
			 | 
			
			
				-    //  $this->generateUrl('MuzichAdminBundle_moderate_tags_accept_tag', array( 
			 | 
		
	
		
			
			| 
				626
			 | 
			
				
			 | 
			
			
				-    //    'tag_id' => $Tag0001->getId() 
			 | 
		
	
		
			
			| 
				627
			 | 
			
				
			 | 
			
			
				-    //  )), 
			 | 
		
	
		
			
			| 
				628
			 | 
			
				
			 | 
			
			
				-    //  array(),  
			 | 
		
	
		
			
			| 
				629
			 | 
			
				
			 | 
			
			
				-    //  array(),  
			 | 
		
	
		
			
			| 
				630
			 | 
			
				
			 | 
			
			
				-    //  array('HTTP_X-Requested-With' => 'XMLHttpRequest') 
			 | 
		
	
		
			
			| 
				631
			 | 
			
				
			 | 
			
			
				-    //); 
			 | 
		
	
		
			
			| 
				632
			 | 
			
				
			 | 
			
			
				-    //$this->isResponseSuccess(); 
			 | 
		
	
		
			
			| 
				633
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				634
			 | 
			
				
			 | 
			
			
				-    //// Le tag est toujours 
			 | 
		
	
		
			
			| 
				635
			 | 
			
				
			 | 
			
			
				-    //$Tag0001 = $this->getDoctrine()->getRepository('MuzichCoreBundle:Tag')->findOneByName('Tag0001'); 
			 | 
		
	
		
			
			| 
				636
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals(false, is_null($Tag0001)); 
			 | 
		
	
		
			
			| 
				637
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				638
			 | 
			
				
			 | 
			
			
				-    //// Mais n'est plus "a modérer" 
			 | 
		
	
		
			
			| 
				639
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals(null, $Tag0001->getPrivateids()); 
			 | 
		
	
		
			
			| 
				640
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				641
			 | 
			
				
			 | 
			
			
				-    //// L'élément ne dois plus l'avoir comme tag 
			 | 
		
	
		
			
			| 
				642
			 | 
			
				
			 | 
			
			
				-    //$element = $this->getDoctrine()->getRepository('MuzichCoreBundle:Element') 
			 | 
		
	
		
			
			| 
				643
			 | 
			
				
			 | 
			
			
				-    //  ->findOneByName('Lelement de tag0001') 
			 | 
		
	
		
			
			| 
				644
			 | 
			
				
			 | 
			
			
				-    //; 
			 | 
		
	
		
			
			| 
				645
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				646
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals(json_encode(array((int)$Tag0001->getId())), $element->getTagsIdsJson()); 
			 | 
		
	
		
			
			| 
				647
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				648
			 | 
			
				
			 | 
			
			
				-    //// les utilisateurs ayant demandé ne sont pas pénalisés 
			 | 
		
	
		
			
			| 
				649
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals($paul_moderated_tags_count+1, $this->getUser('paul')->getModeratedTagCount()); 
			 | 
		
	
		
			
			| 
				650
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals($joelle_moderated_tags_count+1, $this->getUser('joelle')->getModeratedTagCount()); 
			 | 
		
	
		
			
			| 
				651
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				652
			 | 
			
				
			 | 
			
			
				-    //// On remplace le tag Tag0002 par tribe 
			 | 
		
	
		
			
			| 
				653
			 | 
			
				
			 | 
			
			
				-    //$this->crawler = $this->client->request( 
			 | 
		
	
		
			
			| 
				654
			 | 
			
				
			 | 
			
			
				-    //  'GET',  
			 | 
		
	
		
			
			| 
				655
			 | 
			
				
			 | 
			
			
				-    //  $this->generateUrl('MuzichAdminBundle_moderate_tags_replace_tag', array( 
			 | 
		
	
		
			
			| 
				656
			 | 
			
				
			 | 
			
			
				-    //    'tag_id'     => $Tag0002->getId(), 
			 | 
		
	
		
			
			| 
				657
			 | 
			
				
			 | 
			
			
				-    //    'tag_new_id' => json_encode(array($tribe->getId())) 
			 | 
		
	
		
			
			| 
				658
			 | 
			
				
			 | 
			
			
				-    //  )), 
			 | 
		
	
		
			
			| 
				659
			 | 
			
				
			 | 
			
			
				-    //  array(),  
			 | 
		
	
		
			
			| 
				660
			 | 
			
				
			 | 
			
			
				-    //  array(),  
			 | 
		
	
		
			
			| 
				661
			 | 
			
				
			 | 
			
			
				-    //  array('HTTP_X-Requested-With' => 'XMLHttpRequest') 
			 | 
		
	
		
			
			| 
				662
			 | 
			
				
			 | 
			
			
				-    //); 
			 | 
		
	
		
			
			| 
				663
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				664
			 | 
			
				
			 | 
			
			
				-    //$this->isResponseSuccess(); 
			 | 
		
	
		
			
			| 
				665
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				666
			 | 
			
				
			 | 
			
			
				-    //// Le tag n'est plus 
			 | 
		
	
		
			
			| 
				667
			 | 
			
				
			 | 
			
			
				-    //$Tag0002 = $this->getDoctrine()->getRepository('MuzichCoreBundle:Tag')->findOneByName('Tag0002'); 
			 | 
		
	
		
			
			| 
				668
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals(true, is_null($Tag0002)); 
			 | 
		
	
		
			
			| 
				669
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				670
			 | 
			
				
			 | 
			
			
				-    //// L'élement a tribe comme tag 
			 | 
		
	
		
			
			| 
				671
			 | 
			
				
			 | 
			
			
				-    //$element = $this->getDoctrine()->getRepository('MuzichCoreBundle:Element') 
			 | 
		
	
		
			
			| 
				672
			 | 
			
				
			 | 
			
			
				-    //  ->findOneByName('Lelement de tag0002') 
			 | 
		
	
		
			
			| 
				673
			 | 
			
				
			 | 
			
			
				-    //; 
			 | 
		
	
		
			
			| 
				674
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				675
			 | 
			
				
			 | 
			
			
				-    //// $this->assertEquals(json_encode(array((int)$tribe->getId())), $element->getTagsIdsJson()); 
			 | 
		
	
		
			
			| 
				676
			 | 
			
				
			 | 
			
			
				-    //// WARNING;TODO;FIXTHIS: Ce n'est pas normal, en base pas d'enregistrement en plus 
			 | 
		
	
		
			
			| 
				677
			 | 
			
				
			 | 
			
			
				-    //// étrange ... 
			 | 
		
	
		
			
			| 
				678
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals(json_encode(array(null,(int)$tribe->getId())), $element->getTagsIdsJson()); 
			 | 
		
	
		
			
			| 
				679
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				680
			 | 
			
				
			 | 
			
			
				-    //// les utilisateurs ayant demandé ne sont pas pénalisés 
			 | 
		
	
		
			
			| 
				681
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals($paul_moderated_tags_count+1, $this->getUser('paul')->getModeratedTagCount()); 
			 | 
		
	
		
			
			| 
				682
			 | 
			
				
			 | 
			
			
				-    //$this->assertEquals($joelle_moderated_tags_count+1, $this->getUser('joelle')->getModeratedTagCount()); 
			 | 
		
	
		
			
			| 
				683
			 | 
			
				
			 | 
			
			
				-    // 
			 | 
		
	
		
			
			| 
				
			 | 
			
				552
			 | 
			
			
				+    // On se rend sur la page de moderation des tags 
			 | 
		
	
		
			
			| 
				
			 | 
			
				553
			 | 
			
			
				+    $this->crawler = $this->client->request('GET', $this->generateUrl('Muzich_AdminBundle_Moderate_tag_list')); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				554
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				555
			 | 
			
			
				+    // On peux voir les tags  
			 | 
		
	
		
			
			| 
				
			 | 
			
				556
			 | 
			
			
				+    $this->exist('body:contains("Tag0000")'); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				557
			 | 
			
			
				+    $this->exist('body:contains("Tag0001")'); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				558
			 | 
			
			
				+    $this->exist('body:contains("Tag0002")'); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				559
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				560
			 | 
			
			
				+    /* 
			 | 
		
	
		
			
			| 
				
			 | 
			
				561
			 | 
			
			
				+     * Etapes: 
			 | 
		
	
		
			
			| 
				
			 | 
			
				562
			 | 
			
			
				+     *  
			 | 
		
	
		
			
			| 
				
			 | 
			
				563
			 | 
			
			
				+     * On refuse Tag0000 
			 | 
		
	
		
			
			| 
				
			 | 
			
				564
			 | 
			
			
				+     *  => L'élément lié a ce tag ne l'a plus 
			 | 
		
	
		
			
			| 
				
			 | 
			
				565
			 | 
			
			
				+     *  => Le ou les users qui l'on demandé sont incrementé 
			 | 
		
	
		
			
			| 
				
			 | 
			
				566
			 | 
			
			
				+     * On accepte Tag0001 
			 | 
		
	
		
			
			| 
				
			 | 
			
				567
			 | 
			
			
				+     *  => L'élément lié a ce tag l'a toujours 
			 | 
		
	
		
			
			| 
				
			 | 
			
				568
			 | 
			
			
				+     * On remplace Tag0002 par tribe 
			 | 
		
	
		
			
			| 
				
			 | 
			
				569
			 | 
			
			
				+     *  => L'élément lié a ce tag a le nouveau 
			 | 
		
	
		
			
			| 
				
			 | 
			
				570
			 | 
			
			
				+     *  => Les users qui l'ont demandé ne sont pas pénalisés  
			 | 
		
	
		
			
			| 
				
			 | 
			
				571
			 | 
			
			
				+     */ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				572
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				573
			 | 
			
			
				+    // On refuse Tag0000 
			 | 
		
	
		
			
			| 
				
			 | 
			
				574
			 | 
			
			
				+    $this->crawler = $this->client->request('GET', $this->generateUrl( 
			 | 
		
	
		
			
			| 
				
			 | 
			
				575
			 | 
			
			
				+      'Muzich_AdminBundle_Moderate_tag_refuse', 
			 | 
		
	
		
			
			| 
				
			 | 
			
				576
			 | 
			
			
				+      array('pk' => $Tag0000->getId()) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				577
			 | 
			
			
				+    )); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				578
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				579
			 | 
			
			
				+    $this->isResponseRedirection(); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				580
			 | 
			
			
				+    $this->followRedirection(); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				581
			 | 
			
			
				+    $this->isResponseSuccess(); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				582
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				583
			 | 
			
			
				+    // Le tag n'est plus 
			 | 
		
	
		
			
			| 
				
			 | 
			
				584
			 | 
			
			
				+    $Tag0000 = $this->getDoctrine()->getRepository('MuzichCoreBundle:Tag')->findOneByName('Tag0000'); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				585
			 | 
			
			
				+    $this->assertEquals(true, is_null($Tag0000)); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				586
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				587
			 | 
			
			
				+    // L'élément ne dois plus l'avoir comme tag 
			 | 
		
	
		
			
			| 
				
			 | 
			
				588
			 | 
			
			
				+    $element = $this->getDoctrine()->getRepository('MuzichCoreBundle:Element') 
			 | 
		
	
		
			
			| 
				
			 | 
			
				589
			 | 
			
			
				+      ->findOneByName('Lelement de tag0000') 
			 | 
		
	
		
			
			| 
				
			 | 
			
				590
			 | 
			
			
				+    ; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				591
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				592
			 | 
			
			
				+    $this->assertEquals('[]', $element->getTagsIdsJson()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				593
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				594
			 | 
			
			
				+    // les utilisateurs ayant demandé ce tag ont été pénalisés 
			 | 
		
	
		
			
			| 
				
			 | 
			
				595
			 | 
			
			
				+    $this->assertEquals($paul_moderated_tags_count+1, $this->getUser('paul')->getModeratedTagCount()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				596
			 | 
			
			
				+    $this->assertEquals($joelle_moderated_tags_count+1, $this->getUser('joelle')->getModeratedTagCount()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				597
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				598
			 | 
			
			
				+    // On accepte Tag0001 
			 | 
		
	
		
			
			| 
				
			 | 
			
				599
			 | 
			
			
				+    $this->crawler = $this->client->request('GET', $this->generateUrl( 
			 | 
		
	
		
			
			| 
				
			 | 
			
				600
			 | 
			
			
				+      'Muzich_AdminBundle_Moderate_tag_accept', 
			 | 
		
	
		
			
			| 
				
			 | 
			
				601
			 | 
			
			
				+      array('pk' => $Tag0001->getId()) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				602
			 | 
			
			
				+    )); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				603
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				604
			 | 
			
			
				+    $this->isResponseRedirection(); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				605
			 | 
			
			
				+    $this->followRedirection(); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				606
			 | 
			
			
				+    $this->isResponseSuccess(); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				607
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				608
			 | 
			
			
				+    // Le tag est toujours 
			 | 
		
	
		
			
			| 
				
			 | 
			
				609
			 | 
			
			
				+    $Tag0001 = $this->getDoctrine()->getRepository('MuzichCoreBundle:Tag')->findOneByName('Tag0001'); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				610
			 | 
			
			
				+    $this->assertEquals(false, is_null($Tag0001)); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				611
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				612
			 | 
			
			
				+    // Mais n'est plus "a modérer" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				613
			 | 
			
			
				+    $this->assertEquals(null, $Tag0001->getPrivateids()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				614
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				615
			 | 
			
			
				+    // L'élément ne dois plus l'avoir comme tag 
			 | 
		
	
		
			
			| 
				
			 | 
			
				616
			 | 
			
			
				+    $element = $this->getDoctrine()->getRepository('MuzichCoreBundle:Element') 
			 | 
		
	
		
			
			| 
				
			 | 
			
				617
			 | 
			
			
				+      ->findOneByName('Lelement de tag0001') 
			 | 
		
	
		
			
			| 
				
			 | 
			
				618
			 | 
			
			
				+    ; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				619
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				620
			 | 
			
			
				+    $this->assertEquals(json_encode(array((int)$Tag0001->getId())), $element->getTagsIdsJson()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				621
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				
			 | 
			
				622
			 | 
			
			
				+    // les utilisateurs ayant demandé ne sont pas pénalisés 
			 | 
		
	
		
			
			| 
				
			 | 
			
				623
			 | 
			
			
				+    $this->assertEquals($paul_moderated_tags_count+1, $this->getUser('paul')->getModeratedTagCount()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				624
			 | 
			
			
				+    $this->assertEquals($joelle_moderated_tags_count+1, $this->getUser('joelle')->getModeratedTagCount()); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				625
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				684
			 | 
			
				626
			 | 
			
			
				   } 
			 | 
		
	
		
			
			| 
				685
			 | 
			
				627
			 | 
			
			
				    
			 | 
		
	
		
			
			| 
				686
			 | 
			
				628
			 | 
			
			
				 } 
			 |