Browse Source

Mise a jour des tests sur les Tags (modifs dans le code l'impliquant)

bastien 13 years ago
parent
commit
c64964b86b
1 changed files with 5 additions and 5 deletions
  1. 5 5
      src/Muzich/CoreBundle/Tests/Controller/TagsTest.php

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

15
     $this->connectUser('paul', 'toor');
15
     $this->connectUser('paul', 'toor');
16
     
16
     
17
     // On commence par ajouter un tag
17
     // On commence par ajouter un tag
18
-    $url = $this->generateUrl('ajax_add_tag', array('name' => 'Mon Beau Tag'));
18
+    $url = $this->generateUrl('ajax_add_tag');
19
     
19
     
20
-    $crawler = $this->client->request('GET', $url, array(), array(), array(
21
-        'X-Requested-With' => 'XMLHttpRequest',
20
+    $crawler = $this->client->request('POST', $url, array('tag_name' => 'Mon Beau Tag'), array(), array(
21
+        'HTTP_X-Requested-With' => 'XMLHttpRequest',
22
     ));
22
     ));
23
+    
23
     $this->isResponseSuccess();
24
     $this->isResponseSuccess();
24
     
25
     
25
     $response = json_decode($this->client->getResponse()->getContent(), true);
26
     $response = json_decode($this->client->getResponse()->getContent(), true);
91
     
92
     
92
     // Lors d'une recherche de tag
93
     // Lors d'une recherche de tag
93
     $url = $this->generateUrl('search_tag', array(
94
     $url = $this->generateUrl('search_tag', array(
94
-      'string_search' => 'mon beau tag',
95
       'timestamp'     => time()
95
       'timestamp'     => time()
96
     ));
96
     ));
97
-    $crawler = $this->client->request('GET', $url, array(), array(), array(
97
+    $crawler = $this->client->request('POST', $url, array('string_search' => 'mon beau tag'), array(), array(
98
         'HTTP_X-Requested-With' => 'XMLHttpRequest'
98
         'HTTP_X-Requested-With' => 'XMLHttpRequest'
99
     ));
99
     ));
100
     
100