Просмотр исходного кода

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

bastien 13 лет назад
Родитель
Сommit
c64964b86b
1 измененных файлов: 5 добавлений и 5 удалений
  1. 5 5
      src/Muzich/CoreBundle/Tests/Controller/TagsTest.php

+ 5 - 5
src/Muzich/CoreBundle/Tests/Controller/TagsTest.php Просмотреть файл

@@ -15,11 +15,12 @@ class TagsTest extends FunctionalTest
15 15
     $this->connectUser('paul', 'toor');
16 16
     
17 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 24
     $this->isResponseSuccess();
24 25
     
25 26
     $response = json_decode($this->client->getResponse()->getContent(), true);
@@ -91,10 +92,9 @@ class TagsTest extends FunctionalTest
91 92
     
92 93
     // Lors d'une recherche de tag
93 94
     $url = $this->generateUrl('search_tag', array(
94
-      'string_search' => 'mon beau tag',
95 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 98
         'HTTP_X-Requested-With' => 'XMLHttpRequest'
99 99
     ));
100 100