Code Duplication    Length = 8-9 lines in 3 locations

tests/NestedIntervalsBehavior64TestCase.php 2 locations

@@ 484-491 (lines=8) @@
481
        $this->assertDataSetsEqual($expectedDataSet, $dataSet);
482
    }
483
484
    public function testDelete()
485
    {
486
        $this->assertEquals(1, MultipleTreeNode64::findOne(30)->delete());
487
488
        $dataSet = $this->getConnection()->createDataSet(['multiple_tree_64']);
489
        $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-delete-64.php'));
490
        $this->assertDataSetsEqual($expectedDataSet, $dataSet);
491
    }
492
493
    public function testDeleteWithChildren()
494
    {
@@ 503-510 (lines=8) @@
500
        $this->assertDataSetsEqual($expectedDataSet, $dataSet);
501
    }
502
503
    public function testOptimize()
504
    {
505
        MultipleTreeNode64::findOne(6)->optimize();
506
507
        $dataSet = $this->getConnection()->createDataSet(['multiple_tree_64']);
508
        $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-optimize-64.php'));
509
        $this->assertDataSetsEqual($expectedDataSet, $dataSet);
510
    }
511
}

tests/NestedIntervalsBehaviorTestCase.php 1 location

@@ 1008-1016 (lines=9) @@
1005
        $node->deleteWithChildren();
1006
    }
1007
1008
    public function testOptimize()
1009
    {
1010
        Node::findOne(6)->optimize();
1011
        MultipleTreeNode::findOne(9)->optimize();
1012
1013
        $dataSet = $this->getConnection()->createDataSet(['tree', 'multiple_tree']);
1014
        $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-optimize.php'));
1015
        $this->assertDataSetsEqual($expectedDataSet, $dataSet);
1016
    }
1017
1018
    /**
1019
     * @expectedException \yii\base\NotSupportedException