Code Duplication    Length = 10-10 lines in 2 locations

tests/Model/LogEntryTest.php 2 locations

@@ 50-59 (lines=10) @@
47
    /**
48
     * We can view if we're logged in as admin. Otherwise, no.
49
     */
50
    public function testAllowView()
51
    {
52
        $this->logOut();
53
        $viewFalse = LogEntry::create()->canView(null);
54
        $this->assertFalse($viewFalse);
55
56
        $this->logInWithPermission('ADMIN');
57
        $viewTrue = LogEntry::create()->canView();
58
        $this->assertTrue($viewTrue);
59
    }
60
61
    /**
62
     * We can Delete if we're logged in as admin. Otherwise, no.
@@ 64-73 (lines=10) @@
61
    /**
62
     * We can Delete if we're logged in as admin. Otherwise, no.
63
     */
64
    public function testAllowDelete()
65
    {
66
        $this->logOut();
67
        $deleteFalse = LogEntry::create()->canDelete(null);
68
        $this->assertFalse($deleteFalse);
69
70
        $this->logInWithPermission('ADMIN');
71
        $deleteTrue = LogEntry::create()->canDelete();
72
        $this->assertTrue($deleteTrue);
73
    }
74
75
    /**
76
     * Ensure that the contents are JSON encoded and pretty printed, and that the CSS class is correct