Browse Source

Modifs de test pour Anomalie #142

bastien 13 years ago
parent
commit
0029cdfcee
1 changed files with 14 additions and 2 deletions
  1. 14 2
      src/Muzich/CoreBundle/Tests/Controller/TagsTest.php

+ 14 - 2
src/Muzich/CoreBundle/Tests/Controller/TagsTest.php View File

85
     $this->client->request('GET', $this->generateUrl('favorites_my_list'));
85
     $this->client->request('GET', $this->generateUrl('favorites_my_list'));
86
     $this->isResponseSuccess();
86
     $this->isResponseSuccess();
87
     
87
     
88
+    $this->outputDebug();
88
     $this->exist('li.element_tag');
89
     $this->exist('li.element_tag');
89
     $this->exist('li.element_tag:contains("Mon beau tag")');
90
     $this->exist('li.element_tag:contains("Mon beau tag")');
91
+    $this->exist('body:contains("Mon beau tag")');
90
     
92
     
91
     // Lors d'une recherche de tag
93
     // Lors d'une recherche de tag
92
     $url = $this->generateUrl('search_tag', array(
94
     $url = $this->generateUrl('search_tag', array(
103
     $this->assertTrue($this->findTagNameInResponse($response, 'Mon beau tag', 'data'));
105
     $this->assertTrue($this->findTagNameInResponse($response, 'Mon beau tag', 'data'));
104
     
106
     
105
     // En revanche, bux ne pourra pas les voirs lui.
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
     $this->disconnectUser();
109
     $this->disconnectUser();
107
     $this->client = self::createClient();
110
     $this->client = self::createClient();
108
     $this->connectUser('bux', 'toor');
111
     $this->connectUser('bux', 'toor');
115
     $this->exist('li.element_tag');
118
     $this->exist('li.element_tag');
116
     $this->notExist('li.element_tag:contains("Mon beau tag")');
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
     $this->client->request('GET', $this->generateUrl('favorite_user_list', array('slug' => $paul->getSlug())));
122
     $this->client->request('GET', $this->generateUrl('favorite_user_list', array('slug' => $paul->getSlug())));
120
     $this->isResponseSuccess();
123
     $this->isResponseSuccess();
121
     
124
     
122
     $this->exist('li.element_tag');
125
     $this->exist('li.element_tag');
123
     $this->notExist('li.element_tag:contains("Mon beau tag")');
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
     // Lors d'une recherche de tag
137
     // Lors d'une recherche de tag
126
     $url = $this->generateUrl('search_tag', array(
138
     $url = $this->generateUrl('search_tag', array(
154
       }
166
       }
155
     }
167
     }
156
   }
168
   }
157
-  
169
+    
158
 }
170
 }