Code Duplication    Length = 15-15 lines in 3 locations

tests/DMSDocumentTest.php 1 location

@@ 6-20 (lines=15) @@
3
{
4
    protected static $fixture_file = 'dmstest.yml';
5
6
    public function tearDownOnce()
7
    {
8
        self::$is_running_test = true;
9
10
        $d = DataObject::get('DMSDocument');
11
        foreach ($d as $d1) {
12
            $d1->delete();
13
        }
14
        $t = DataObject::get('DMSTag');
15
        foreach ($t as $t1) {
16
            $t1->delete();
17
        }
18
19
        self::$is_running_test = $this->originalIsRunningTest;
20
    }
21
22
    public function testPageRelations()
23
    {

tests/DMSEmbargoTest.php 1 location

@@ 6-20 (lines=15) @@
3
{
4
    public static $fixture_file = "dmsembargotest.yml";
5
6
    public function tearDownOnce()
7
    {
8
        self::$is_running_test = true;
9
10
        $d = DataObject::get("DMSDocument");
11
        foreach ($d as $d1) {
12
            $d1->delete();
13
        }
14
        $t = DataObject::get("DMSTag");
15
        foreach ($t as $t1) {
16
            $t1->delete();
17
        }
18
19
        self::$is_running_test = $this->originalIsRunningTest;
20
    }
21
22
    public function createFakeHTTPRequest($id)
23
    {

tests/DMSTagTest.php 1 location

@@ 6-20 (lines=15) @@
3
{
4
    protected $usesDatabase = true;
5
6
    public function tearDownOnce()
7
    {
8
        self::$is_running_test = true;
9
10
        $d = DataObject::get("DMSDocument");
11
        foreach ($d as $d1) {
12
            $d1->delete();
13
        }
14
        $t = DataObject::get("DMSTag");
15
        foreach ($t as $t1) {
16
            $t1->delete();
17
        }
18
19
        self::$is_running_test = $this->originalIsRunningTest;
20
    }
21
22
    public function testAddingTags()
23
    {