Completed
Push — master ( 6dd6b9...53a464 )
by Andrii
12:52
created

CommandTest::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 7
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
/**
3
 * Tools to use API as ActiveRecord for Yii2
4
 *
5
 * @link      https://github.com/hiqdev/yii2-hiart
6
 * @package   yii2-hiart
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hiqdev\hiart\tests\unit;
12
13
use hiqdev\hiart\Command;
14
use Yii;
15
16
/**
17
 * Command test class.
18
 */
19
class CommandTest extends \PHPUnit_Framework_TestCase
20
{
21
    /**
22
     * @var Command
23
     */
24
    protected $command;
25
26
    protected $table = 'testAction';
27
    protected $columns = ['a' => 'b'];
28
29
    protected function setUp()
30
    {
31
        $this->command = Yii::createObject([
32
            'class' => Command::class,
33
            'db'    => Yii::$app->get('hiart'),
34
        ]);
35
    }
36
37
    protected function tearDown()
38
    {
39
    }
40
41
    public function testInsert()
42
    {
43
        $this->command->insert($this->table, $this->columns);
44
    }
45
}
46