Code Duplication    Length = 28-28 lines in 2 locations

src/TestSuite/IntegrationTestCase.php 1 location

@@ 71-98 (lines=28) @@
68
     *
69
     * @return void
70
     */
71
    public function setUp()
72
    {
73
        parent::setUp();
74
75
        if (!Plugin::loaded($this->_corePlugin)) {
76
            $loadParams = [
77
                'bootstrap' => true,
78
                'routes'    => true,
79
                'path'      => ROOT . DS,
80
            ];
81
82
            Plugin::load($this->_corePlugin, $loadParams);
83
            Plugin::routes($this->_corePlugin);
84
        }
85
86
        if ($this->_plugin !== $this->_corePlugin) {
87
            $options = [
88
                'bootstrap' => true,
89
                'routes'    => true,
90
                'autoload'  => true,
91
            ];
92
93
            Plugin::load($this->_plugin, $options);
94
            Plugin::routes($this->_plugin);
95
96
            $this->_url['plugin'] = $this->_plugin;
97
        }
98
    }
99
100
    /**
101
     * Clears the state used for requests.

src/TestSuite/TestCase.php 1 location

@@ 68-95 (lines=28) @@
65
     *
66
     * @return void
67
     */
68
    public function setUp()
69
    {
70
        parent::setUp();
71
72
        if ($this->_plugin !== $this->_corePlugin) {
73
            $options = [
74
                'bootstrap' => true,
75
                'routes'    => true,
76
                'autoload'  => true,
77
            ];
78
79
            Plugin::load($this->_plugin, $options);
80
            Plugin::routes($this->_plugin);
81
        }
82
83
        if (!Plugin::loaded($this->_corePlugin)) {
84
            $loadParams = [
85
                'bootstrap' => true,
86
                'routes'    => true,
87
                'path'      => ROOT . DS,
88
            ];
89
90
            Plugin::load($this->_corePlugin, $loadParams);
91
            Plugin::routes($this->_corePlugin);
92
        }
93
94
        $this->_cms = Cms::getInstance();
95
    }
96
97
    /**
98
     * Clears the state used for requests.