1 | <?php |
||
29 | class PollWebTestCase extends WebTestCase |
||
30 | { |
||
31 | /** @var Client */ |
||
32 | protected static $client; |
||
33 | /** @var TranslatorInterface */ |
||
34 | protected static $translator; |
||
35 | |||
36 | /** |
||
37 | * WebTestCase setup (automitically called by framework before any test) |
||
38 | */ |
||
39 | public static function setUpBeforeClass() |
||
45 | |||
46 | /** |
||
47 | * Clicks a link |
||
48 | * |
||
49 | * @param Crawler $crawler |
||
50 | * @param string $where Translation key of the link text |
||
51 | * |
||
52 | * @return Crawler |
||
53 | */ |
||
54 | public static function clickLink(Crawler $crawler, $where) |
||
59 | |||
60 | /** |
||
61 | * Clicks a button |
||
62 | * |
||
63 | * @param Crawler $crawler |
||
64 | * @param string $button Translation key of the button name |
||
65 | * @param string $formName Name of the template |
||
66 | * @param array $formData Form data |
||
67 | * |
||
68 | * @return Crawler |
||
69 | */ |
||
70 | public static function submitForm(Crawler $crawler, $button, $formName = "", $formData = []) |
||
82 | |||
83 | /** |
||
84 | * Checks an element is present in the page |
||
85 | * |
||
86 | * @param Crawler $crawler |
||
87 | * @param string $filter CSS filter |
||
88 | * @param integer $count number of expected occurences |
||
89 | * |
||
90 | * @return Crawler |
||
91 | */ |
||
92 | public function checkElement(Crawler $crawler, $filter, $count = 1) |
||
98 | |||
99 | /** |
||
100 | * Creates a poll |
||
101 | * |
||
102 | * @return Crawler |
||
103 | */ |
||
104 | public static function createPollEntry() |
||
114 | |||
115 | /** |
||
116 | * Deletes a poll |
||
117 | * |
||
118 | * @param Crawler $crawler |
||
119 | * |
||
120 | * @return Crawler |
||
121 | */ |
||
122 | public static function deletePollEntry(Crawler $crawler) |
||
127 | } |
||
128 |