Code Duplication    Length = 16-16 lines in 2 locations

src/SumoCoders/FrameworkCoreBundle/Tests/Controller/DatePickerControllerTest.php 2 locations

@@ 61-76 (lines=16) @@
58
        $this->assertEquals($date->format('d/m/Y'), $element->attr('value'));
59
    }
60
61
    public function testIfSingleTextWithDatePickerAndOnlyDatesInTheFutureRenderedCorrectly()
62
    {
63
        $crawler = $this->getCrawlerForRequest('GET', '/_tests/datepicker');
64
        $date = new \DateTime();
65
        $startDate = new \DateTime('last monday');
66
67
        $element = $crawler->filter('input#form_date_example5');
68
69
        $this->assertEquals(1, $element->count());
70
71
        // check if it has all the required data-attributes
72
        $this->assertEquals($startDate->format('d/m/Y'), $element->attr('data-date-start-date'));
73
74
        // check if the actual element is hidden
75
        $this->assertEquals($date->format('d/m/Y'), $element->attr('value'));
76
    }
77
78
    public function testIfSingleTextWithDatePickerAndOnlyDatesInThePastRenderedCorrectly()
79
    {
@@ 78-93 (lines=16) @@
75
        $this->assertEquals($date->format('d/m/Y'), $element->attr('value'));
76
    }
77
78
    public function testIfSingleTextWithDatePickerAndOnlyDatesInThePastRenderedCorrectly()
79
    {
80
        $crawler = $this->getCrawlerForRequest('GET', '/_tests/datepicker');
81
        $date = new \DateTime();
82
        $endDate = new \DateTime('next friday');
83
84
        $element = $crawler->filter('input#form_date_example6');
85
86
        $this->assertEquals(1, $element->count());
87
88
        // check if it has all the required data-attributes
89
        $this->assertEquals($endDate->format('d/m/Y'), $element->attr('data-date-end-date'));
90
91
        // check if the actual element is hidden
92
        $this->assertEquals($date->format('d/m/Y'), $element->attr('value'));
93
    }
94
95
    public function testIfSingleTextWithDatePickerAndOnlyDatesBetweenCorrectly()
96
    {