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

CommandTest::testInsert()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
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