Kaynağa Gözat

Modifs de test pour Anomalie #142

bastien 12 yıl önce
ebeveyn
işleme
0029cdfcee

+ 14 - 2
src/Muzich/CoreBundle/Tests/Controller/TagsTest.php Dosyayı Görüntüle

@@ -85,8 +85,10 @@ class TagsTest extends FunctionalTest
85 85
     $this->client->request('GET', $this->generateUrl('favorites_my_list'));
86 86
     $this->isResponseSuccess();
87 87
     
88
+    $this->outputDebug();
88 89
     $this->exist('li.element_tag');
89 90
     $this->exist('li.element_tag:contains("Mon beau tag")');
91
+    $this->exist('body:contains("Mon beau tag")');
90 92
     
91 93
     // Lors d'une recherche de tag
92 94
     $url = $this->generateUrl('search_tag', array(
@@ -103,6 +105,7 @@ class TagsTest extends FunctionalTest
103 105
     $this->assertTrue($this->findTagNameInResponse($response, 'Mon beau tag', 'data'));
104 106
     
105 107
     // En revanche, bux ne pourra pas les voirs lui.
108
+    // Sur la page home, sur la page des favoris de paul, et sur le profil de paul
106 109
     $this->disconnectUser();
107 110
     $this->client = self::createClient();
108 111
     $this->connectUser('bux', 'toor');
@@ -115,12 +118,21 @@ class TagsTest extends FunctionalTest
115 118
     $this->exist('li.element_tag');
116 119
     $this->notExist('li.element_tag:contains("Mon beau tag")');
117 120
     
118
-    // sur ma page de favoris de paul
121
+    // sur la page de favoris de paul
119 122
     $this->client->request('GET', $this->generateUrl('favorite_user_list', array('slug' => $paul->getSlug())));
120 123
     $this->isResponseSuccess();
121 124
     
122 125
     $this->exist('li.element_tag');
123 126
     $this->notExist('li.element_tag:contains("Mon beau tag")');
127
+    $this->notExist('body:contains("Mon beau tag")');
128
+    
129
+    // sur la page de profil de paul
130
+    $this->client->request('GET', $this->generateUrl('show_user', array('slug' => $paul->getSlug())));
131
+    $this->isResponseSuccess();
132
+    
133
+    $this->exist('li.element_tag');
134
+    $this->notExist('li.element_tag:contains("Mon beau tag")');
135
+    $this->notExist('body:contains("Mon beau tag")');
124 136
     
125 137
     // Lors d'une recherche de tag
126 138
     $url = $this->generateUrl('search_tag', array(
@@ -154,5 +166,5 @@ class TagsTest extends FunctionalTest
154 166
       }
155 167
     }
156 168
   }
157
-  
169
+    
158 170
 }