Code Duplication    Length = 27-31 lines in 2 locations

tests/unit/ComboTest.php 1 location

@@ 16-42 (lines=27) @@
13
use hiqdev\combo\Combo;
14
use Yii;
15
16
class ComboTest extends \PHPUnit\Framework\TestCase
17
{
18
    /**
19
     * @var Combo
20
     */
21
    protected $object;
22
23
    protected function setUp()
24
    {
25
        $this->object = Yii::createObject([
26
            'class'         => Combo::class,
27
            'name'          => 'test',
28
            'inputOptions'  => [
29
                'id'    => 'test',
30
            ],
31
        ]);
32
    }
33
34
    protected function tearDown()
35
    {
36
    }
37
38
    public function testConstruct()
39
    {
40
        $this->assertInstanceOf(Combo::class, $this->object);
41
    }
42
}
43

tests/unit/StaticComboTest.php 1 location

@@ 16-46 (lines=31) @@
13
use hiqdev\combo\StaticCombo;
14
use Yii;
15
16
class StaticComboTest extends \PHPUnit\Framework\TestCase
17
{
18
    /**
19
     * @var StaticCombo
20
     */
21
    protected $object;
22
23
    protected $data = [
24
        'test' => 'test',
25
    ];
26
27
    protected function setUp()
28
    {
29
        $this->object = Yii::createObject([
30
            'class' => StaticCombo::class,
31
            'data' => $this->data,
32
            'inputOptions' => [
33
                'id' => 'test',
34
            ],
35
        ]);
36
    }
37
38
    protected function tearDown()
39
    {
40
    }
41
42
    public function testConstruct()
43
    {
44
        $this->assertInstanceOf(StaticCombo::class, $this->object);
45
    }
46
}
47