Code Duplication    Length = 11-11 lines in 2 locations

tests/BlogCategoryTest.php 1 location

@@ 117-127 (lines=11) @@
114
        $this->assertTrue($category->canEdit($editor), 'Editor should be able to edit category.');
115
    }
116
117
    public function testCanCreate()
118
    {
119
        $this->useDraftSite();
120
121
        $admin = $this->objFromFixture('SilverStripe\\Security\\Member', 'Admin');
122
        $editor = $this->objFromFixture('SilverStripe\\Security\\Member', 'Editor');
123
124
        $category = singleton('SilverStripe\\Blog\\Model\\BlogCategory');
125
126
        $this->assertTrue($category->canCreate($admin), 'Admin should be able to create category.');
127
        $this->assertTrue($category->canCreate($editor), 'Editor should be able to create category.');
128
    }
129
130
    public function testCanDelete()

tests/BlogTagTest.php 1 location

@@ 123-133 (lines=11) @@
120
        $this->assertTrue($tag->canEdit($editor), 'Editor should be able to edit tag.');
121
    }
122
123
    public function testCanCreate()
124
    {
125
        $this->useDraftSite();
126
127
        $admin = $this->objFromFixture('SilverStripe\\Security\\Member', 'Admin');
128
        $editor = $this->objFromFixture('SilverStripe\\Security\\Member', 'Editor');
129
130
        $tag = singleton('SilverStripe\\Blog\\Model\\BlogTag');
131
132
        $this->assertTrue($tag->canCreate($admin), 'Admin should be able to create tag.');
133
        $this->assertTrue($tag->canCreate($editor), 'Editor should be able to create tag.');
134
    }
135
136
    public function testCanDelete()