Code Duplication    Length = 8-9 lines in 3 locations

tests/Model/LogEntryTest.php 3 locations

@@ 41-49 (lines=9) @@
38
    /**
39
     * There's no reason to manually create, so don't allow manual creation
40
     */
41
    public function testAllowCreate()
42
    {
43
        $createFalse = LogEntry::create()->canCreate(null);
44
        $this->assertFalse($createFalse);
45
        $this->logInWithPermission('ADMIN');
46
        $createFalse = LogEntry::create()->canCreate();
47
        $this->assertFalse($createFalse);
48
49
    }
50
51
    /**
52
     * Test that LogEntry classes can not be edited
@@ 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