Code Duplication    Length = 8-9 lines in 3 locations

tests/Model/LogEntryTest.php 3 locations

@@ 29-37 (lines=9) @@
26
    /**
27
     * There's no reason to manually create, so don't allow manual creation
28
     */
29
    public function testAllowCreate()
30
    {
31
        $createFalse = LogEntry::create()->canCreate(null);
32
        $this->assertFalse($createFalse);
33
        $this->logInWithPermission('ADMIN');
34
        $createFalse = LogEntry::create()->canCreate();
35
        $this->assertFalse($createFalse);
36
    }
37
38
    /**
39
     * Test that LogEntry classes can not be edited
40
     */
@@ 49-56 (lines=8) @@
46
    /**
47
     * We can view if we're logged in as admin. Otherwise, no.
48
     */
49
    public function testAllowView()
50
    {
51
        $viewFalse = LogEntry::create()->canView(null);
52
        $this->assertFalse($viewFalse);
53
        $this->logInWithPermission('ADMIN');
54
        $viewTrue = LogEntry::create()->canView();
55
        $this->assertTrue($viewTrue);
56
    }
57
58
    /**
59
     * We can Delete if we're logged in as admin. Otherwise, no.
@@ 61-68 (lines=8) @@
58
    /**
59
     * We can Delete if we're logged in as admin. Otherwise, no.
60
     */
61
    public function testAllowDelete()
62
    {
63
        $deleteFalse = LogEntry::create()->canDelete(null);
64
        $this->assertFalse($deleteFalse);
65
        $this->logInWithPermission('ADMIN');
66
        $deleteTrue = LogEntry::create()->canDelete();
67
        $this->assertTrue($deleteTrue);
68
    }
69
70
}
71