@@ 39-47 (lines=9) @@ | ||
36 | $this->assertEquals(1, $crawler->filter('input#form_date_example2')->count()); |
|
37 | } |
|
38 | ||
39 | public function testIfSingleTextWithDatePickerAndDefaultDateRenderedCorrectly() |
|
40 | { |
|
41 | $crawler = $this->getCrawlerForRequest('GET', '/_tests/datepicker'); |
|
42 | ||
43 | $element = $crawler->filter('input#form_date_example3'); |
|
44 | ||
45 | $this->assertEquals(1, $element->count()); |
|
46 | $this->assertEquals('20/06/1985', $element->attr('value')); |
|
47 | } |
|
48 | ||
49 | public function testIfSingleTextWithDatePickerRenderedCorrectly() |
|
50 | { |
|
@@ 49-59 (lines=11) @@ | ||
46 | $this->assertEquals('20/06/1985', $element->attr('value')); |
|
47 | } |
|
48 | ||
49 | public function testIfSingleTextWithDatePickerRenderedCorrectly() |
|
50 | { |
|
51 | $crawler = $this->getCrawlerForRequest('GET', '/_tests/datepicker'); |
|
52 | $date = new \DateTime(); |
|
53 | ||
54 | $element = $crawler->filter('input#form_date_example4'); |
|
55 | ||
56 | $this->assertEquals(1, $element->count()); |
|
57 | ||
58 | $this->assertEquals($date->format('d/m/Y'), $element->attr('value')); |
|
59 | } |
|
60 | ||
61 | public function testIfSingleTextWithDatePickerAndOnlyDatesInTheFutureRenderedCorrectly() |
|
62 | { |
|
@@ 114-124 (lines=11) @@ | ||
111 | $this->assertEquals($date->format('d/m/Y'), $element->attr('value')); |
|
112 | } |
|
113 | ||
114 | public function testIfSingleTextWithoutDefaultDateRenderedCorrectly() |
|
115 | { |
|
116 | $crawler = $this->getCrawlerForRequest('GET', '/_tests/datepicker'); |
|
117 | ||
118 | $element = $crawler->filter('input#form_date_example8'); |
|
119 | ||
120 | $this->assertEquals(1, $element->count()); |
|
121 | ||
122 | // check if the actual element is hidden |
|
123 | $this->assertEquals('', $element->attr('value')); |
|
124 | } |
|
125 | } |
|
126 |