Completed
Push — master ( bf612a...7ad254 )
by Robbie
9s
created

AuthorsControllerTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 4
dl 0
loc 26
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testGithubContributorsAreExcludedInAuthorsIndex() 0 21 1
1
<?php
2
3
class AuthorsControllerTest extends SapphireTest
4
{
5
    protected static $fixture_file = 'AuthorsControllerTest.yml';
6
7
    public function testGithubContributorsAreExcludedInAuthorsIndex()
8
    {
9
        $controller = new AuthorsController();
10
11
        $this->assertDOSContains(
12
            [
13
                ['Name' => 'Anna Green'],
14
                ['Name' => 'Stephen McKenna'],
15
                ['Name' => 'Kyra South'],
16
                ['Name' => 'Frank Smith'],
17
            ],
18
            $controller->Authors()
19
        );
20
21
        $names = $controller->Authors()->map('ID', 'Name')->toArray();
22
23
        $this->assertNotContains('GitHub contributors', $names);
24
        $this->assertNotContains('Github contributors', $names);
25
        $this->assertNotContains('Github Contributors', $names);
26
        $this->assertNotContains('GitHub Contributors', $names);
27
    }
28
}
29