Completed
Push — master ( c2606f...ff2953 )
by Cheren
08:57
created

TestCase   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 2
c 1
b 1
f 0
lcom 1
cbo 2
dl 0
loc 34
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 5 1
A tearDown() 0 5 1
1
<?php
2
/**
3
 * CakeCMS Core
4
 *
5
 * This file is part of the of the simple cms based on CakePHP 3.
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 *
9
 * @package   Core
10
 * @license   MIT
11
 * @copyright MIT License http://www.opensource.org/licenses/mit-license.php
12
 * @link      https://github.com/CakeCMS/Core".
13
 * @author    Sergey Kalistratov <[email protected]>
14
 */
15
16
namespace Core\TestSuite;
17
18
use Core\Plugin;
19
use Cake\TestSuite\TestCase as CakeTestCase;
20
21
/**
22
 * Class TestCase
23
 *
24
 * @package Core\TestSuite
25
 */
26
class TestCase extends CakeTestCase
27
{
28
29
    /**
30
     * Default plugin name.
31
     *
32
     * @var string
33
     */
34
    protected $_plugin = 'Core';
35
36
    /**
37
     * Setup the test case, backup the static object values so they can be restored.
38
     * Specifically backs up the contents of Configure and paths in App if they have
39
     * not already been backed up.
40
     *
41
     * @return void
42
     */
43
    public function setUp()
44
    {
45
        parent::setUp();
46
        Plugin::load($this->_plugin, ['path' => ROOT . DS, 'bootstrap' => true]);
47
    }
48
49
    /**
50
     * Clears the state used for requests.
51
     *
52
     * @return void
53
     */
54
    public function tearDown()
55
    {
56
        parent::tearDown();
57
        Plugin::unload($this->_plugin);
58
    }
59
}
60