|
@@ -52,12 +52,14 @@ class HomeControllerTest extends FunctionalTest
|
52
|
52
|
$hardtek_id => 'Hardtek',
|
53
|
53
|
$tribe_id => 'Tribe'
|
54
|
54
|
),
|
55
|
|
- 'count' => $this->getContainer()->getParameter('search_default_count'),
|
56
|
|
- 'user_id' => null,
|
57
|
|
- 'group_id' => null,
|
58
|
|
- 'favorite' => false,
|
59
|
|
- 'ids' => null,
|
60
|
|
- 'ids_display' => null
|
|
55
|
+ 'count' => $this->getContainer()->getParameter('search_default_count'),
|
|
56
|
+ 'user_id' => null,
|
|
57
|
+ 'group_id' => null,
|
|
58
|
+ 'favorite' => false,
|
|
59
|
+ 'ids' => null,
|
|
60
|
+ 'ids_display' => null,
|
|
61
|
+ 'tag_strict' => false,
|
|
62
|
+ 'string' => null,
|
61
|
63
|
), $this->getSession()->get('user.element_search.params'));
|
62
|
64
|
|
63
|
65
|
// On fabrique l'ElementSearcher correspondant
|
|
@@ -564,10 +566,24 @@ class HomeControllerTest extends FunctionalTest
|
564
|
566
|
|
565
|
567
|
$url = $this->generateUrl('element_new_count', array('refid' => $first_id));
|
566
|
568
|
// On effectue la kekete ajax
|
|
569
|
+ //
|
|
570
|
+ // TODO: Ici ça a changé! On trasmet le form de filtre !!!
|
|
571
|
+ /*
|
|
572
|
+ * $form = $this->selectForm('form[action="'.$url.'"] input[type="submit"]');
|
|
573
|
+
|
|
574
|
+ // On met ce que l'on veut dans le form
|
|
575
|
+ $form['element_search_form[network]'] = ElementSearcher::NETWORK_PUBLIC;
|
|
576
|
+ $form['element_search_form[tags]'] = json_encode(array($hardtek_id, $tribe_id));
|
|
577
|
+ $this->submit($form);
|
|
578
|
+ */
|
|
579
|
+
|
567
|
580
|
$crawler = $this->client->request(
|
568
|
|
- 'GET',
|
|
581
|
+ 'POST',
|
569
|
582
|
$url,
|
570
|
|
- array(),
|
|
583
|
+ array('element_search_form' => array(
|
|
584
|
+ 'network' => ElementSearcher::NETWORK_PUBLIC,
|
|
585
|
+ 'tags' => json_encode(array($hardtek_id, $tribe_id))
|
|
586
|
+ )),
|
571
|
587
|
array(),
|
572
|
588
|
array('HTTP_X-Requested-With' => 'XMLHttpRequest')
|
573
|
589
|
);
|
|
@@ -586,9 +602,12 @@ class HomeControllerTest extends FunctionalTest
|
586
|
602
|
$url = $this->generateUrl('element_new_count', array('refid' => $first_id));
|
587
|
603
|
// On effectue la kekete ajax
|
588
|
604
|
$crawler = $this->client->request(
|
589
|
|
- 'GET',
|
|
605
|
+ 'POST',
|
590
|
606
|
$url,
|
591
|
|
- array(),
|
|
607
|
+ array('element_search_form' => array(
|
|
608
|
+ 'network' => ElementSearcher::NETWORK_PUBLIC,
|
|
609
|
+ 'tags' => json_encode(array($hardtek_id, $tribe_id))
|
|
610
|
+ )),
|
592
|
611
|
array(),
|
593
|
612
|
array('HTTP_X-Requested-With' => 'XMLHttpRequest')
|
594
|
613
|
);
|
|
@@ -601,9 +620,12 @@ class HomeControllerTest extends FunctionalTest
|
601
|
620
|
$url = $this->generateUrl('element_new_get', array('refid' => $first_id));
|
602
|
621
|
// On effectue la kekete ajax
|
603
|
622
|
$crawler = $this->client->request(
|
604
|
|
- 'GET',
|
|
623
|
+ 'POST',
|
605
|
624
|
$url,
|
606
|
|
- array(),
|
|
625
|
+ array('element_search_form' => array(
|
|
626
|
+ 'network' => ElementSearcher::NETWORK_PUBLIC,
|
|
627
|
+ 'tags' => json_encode(array($hardtek_id, $tribe_id))
|
|
628
|
+ )),
|
607
|
629
|
array(),
|
608
|
630
|
array('HTTP_X-Requested-With' => 'XMLHttpRequest')
|
609
|
631
|
);
|
|
@@ -637,9 +659,12 @@ class HomeControllerTest extends FunctionalTest
|
637
|
659
|
$url = $this->generateUrl('element_new_count', array('refid' => $first_id));
|
638
|
660
|
// On effectue la kekete ajax
|
639
|
661
|
$crawler = $this->client->request(
|
640
|
|
- 'GET',
|
|
662
|
+ 'POST',
|
641
|
663
|
$url,
|
642
|
|
- array(),
|
|
664
|
+ array('element_search_form' => array(
|
|
665
|
+ 'network' => ElementSearcher::NETWORK_PUBLIC,
|
|
666
|
+ 'tags' => json_encode(array($hardtek_id, $tribe_id))
|
|
667
|
+ )),
|
643
|
668
|
array(),
|
644
|
669
|
array('HTTP_X-Requested-With' => 'XMLHttpRequest')
|
645
|
670
|
);
|
|
@@ -653,9 +678,12 @@ class HomeControllerTest extends FunctionalTest
|
653
|
678
|
$url = $this->generateUrl('element_new_get', array('refid' => $first_id));
|
654
|
679
|
// On effectue la kekete ajax
|
655
|
680
|
$crawler = $this->client->request(
|
656
|
|
- 'GET',
|
|
681
|
+ 'POST',
|
657
|
682
|
$url,
|
658
|
|
- array(),
|
|
683
|
+ array('element_search_form' => array(
|
|
684
|
+ 'network' => ElementSearcher::NETWORK_PUBLIC,
|
|
685
|
+ 'tags' => json_encode(array($hardtek_id, $tribe_id))
|
|
686
|
+ )),
|
659
|
687
|
array(),
|
660
|
688
|
array('HTTP_X-Requested-With' => 'XMLHttpRequest')
|
661
|
689
|
);
|
|
@@ -687,9 +715,12 @@ class HomeControllerTest extends FunctionalTest
|
687
|
715
|
$url = $this->generateUrl('element_new_count', array('refid' => $element->getId()));
|
688
|
716
|
// On effectue la kekete ajax
|
689
|
717
|
$crawler = $this->client->request(
|
690
|
|
- 'GET',
|
|
718
|
+ 'POST',
|
691
|
719
|
$url,
|
692
|
|
- array(),
|
|
720
|
+ array('element_search_form' => array(
|
|
721
|
+ 'network' => ElementSearcher::NETWORK_PUBLIC,
|
|
722
|
+ 'tags' => json_encode(array($hardtek_id, $tribe_id))
|
|
723
|
+ )),
|
693
|
724
|
array(),
|
694
|
725
|
array('HTTP_X-Requested-With' => 'XMLHttpRequest')
|
695
|
726
|
);
|