Code Duplication    Length = 18-28 lines in 2 locations

src/Graviton/AnalyticsBundle/Tests/Controller/DefaultControllerTest.php 2 locations

@@ 102-119 (lines=18) @@
99
     * Testing basic functionality
100
     * @return void
101
     */
102
    public function testApp2Index()
103
    {
104
        $client = static::createClient();
105
106
        $client->request('GET', $this->router->generate('graviton_analytics_homepage'));
107
108
        $content = $client->getResponse()->getContent();
109
        $service = json_decode($content);
110
111
        // Let's get information from the count
112
        $client->request('GET', $service->services[1]->{'$ref'});
113
        $content = $client->getResponse()->getContent();
114
        $data = json_decode($content);
115
116
        // Counter data result of aggregate
117
        $sampleData = json_decode('{"_id":"app-count-2","count":1}');
118
        $this->assertEquals($sampleData, $data);
119
    }
120
121
    /**
122
     * Testing basic functionality
@@ 125-152 (lines=28) @@
122
     * Testing basic functionality
123
     * @return void
124
     */
125
    public function testCustomerCreateDateFilteringIndex()
126
    {
127
        $client = static::createClient();
128
129
        $client->request('GET', $this->router->generate('graviton_analytics_homepage'));
130
131
        $content = $client->getResponse()->getContent();
132
        $service = json_decode($content);
133
134
        // Let's get information from the count
135
        $client->request('GET', $service->services[2]->{'$ref'});
136
        $content = $client->getResponse()->getContent();
137
        $data = json_decode($content);
138
139
        // Counter data result of aggregate
140
        $sampleData = json_decode(
141
            '[
142
              {
143
                "_id": "100",
144
                "customerNumber": 1100,
145
                "name": "Acme Corps.",
146
                "created_year": 2014,
147
                "created_month": 7
148
              }
149
            ]'
150
        );
151
        $this->assertEquals($sampleData, $data);
152
    }
153
}
154