Code Duplication    Length = 8-9 lines in 3 locations

tests/Model/LogEntryTest.php 3 locations

@@ 62-69 (lines=8) @@
59
    /**
60
     * We can view if we're logged in as admin. Otherwise, no.
61
     */
62
    public function testAllowView()
63
    {
64
        $viewFalse = LogEntry::create()->canView(null);
65
        $this->assertFalse($viewFalse);
66
        $this->logInWithPermission('ADMIN');
67
        $viewTrue = LogEntry::create()->canView();
68
        $this->assertTrue($viewTrue);
69
    }
70
71
    /**
72
     * We can Delete if we're logged in as admin. Otherwise, no.
@@ 74-81 (lines=8) @@
71
    /**
72
     * We can Delete if we're logged in as admin. Otherwise, no.
73
     */
74
    public function testAllowDelete()
75
    {
76
        $deleteFalse = LogEntry::create()->canDelete(null);
77
        $this->assertFalse($deleteFalse);
78
        $this->logInWithPermission('ADMIN');
79
        $deleteTrue = LogEntry::create()->canDelete();
80
        $this->assertTrue($deleteTrue);
81
    }
82
83
}
84
@@ 35-43 (lines=9) @@
32
    /**
33
     * There's no reason to manually create, so don't allow manual creation
34
     */
35
    public function testAllowCreate()
36
    {
37
        $createFalse = LogEntry::create()->canCreate(null);
38
        $this->assertFalse($createFalse);
39
        $this->logInWithPermission('ADMIN');
40
        $createFalse = LogEntry::create()->canCreate();
41
        $this->assertFalse($createFalse);
42
43
    }
44
45
    public function testProvidePermissions()
46
    {