Code Duplication    Length = 16-16 lines in 3 locations

tests/Receiver/ActivityTest.php 3 locations

@@ 124-139 (lines=16) @@
121
    /**
122
     * Test listing repository events
123
     */
124
    public function testListRepositoryEvents()
125
    {
126
        $events = $this->events->listRepositoryEvents();
127
        if (!empty($events)) {
128
            $event = array_pop($events);
129
130
            $this->assertArrayHasKey('id', $event);
131
            $this->assertArrayHasKey('type', $event);
132
            $this->assertArrayHasKey('actor', $event);
133
            $this->assertArrayHasKey('repo', $event);
134
            $this->assertArrayHasKey('payload', $event);
135
            $this->assertArrayHasKey('public', $event);
136
            $this->assertArrayHasKey('created_at', $event);
137
            $this->assertArrayHasKey('org', $event);
138
        }
139
    }
140
141
    /**
142
     * Test listing issues events
@@ 162-177 (lines=16) @@
159
    /**
160
     * Test listing public network events
161
     */
162
    public function testListPublicNetworkEvents()
163
    {
164
        $events = $this->events->listPublicNetworkEvents();
165
        if (!empty($events)) {
166
            $event = array_pop($events);
167
168
            $this->assertArrayHasKey('id', $event);
169
            $this->assertArrayHasKey('type', $event);
170
            $this->assertArrayHasKey('actor', $event);
171
            $this->assertArrayHasKey('repo', $event);
172
            $this->assertArrayHasKey('payload', $event);
173
            $this->assertArrayHasKey('public', $event);
174
            $this->assertArrayHasKey('created_at', $event);
175
            $this->assertArrayHasKey('org', $event);
176
        }
177
    }
178
179
    /**
180
     * Test listing public organization events
@@ 315-330 (lines=16) @@
312
    /**
313
     * Test listing notifications
314
     */
315
    public function testListNotifications()
316
    {
317
        $notifications = $this->notifications->listNotifications(true, true, '2016-02-14');
318
        if (!empty($notifications)) {
319
            $notification = array_pop($notifications);
320
321
            $this->assertArrayHasKey('id', $notification);
322
            $this->assertArrayHasKey('repository', $notification);
323
            $this->assertArrayHasKey('subject', $notification);
324
            $this->assertArrayHasKey('reason', $notification);
325
            $this->assertArrayHasKey('unread', $notification);
326
            $this->assertArrayHasKey('updated_at', $notification);
327
            $this->assertArrayHasKey('last_read_at', $notification);
328
            $this->assertArrayHasKey('url', $notification);
329
        }
330
    }
331
}