Passed
Push — master ( 117d80...68f275 )
by Tõnis
04:24
created

RatingTest::baseModelAttributes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 11
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace andmemasin\surveybasemodels\tests\unit;
4
5
6
require_once __DIR__ . '/../TestBaseActive.php';
7
8
use andmemasin\surveybasemodels\Rating;
9
use andmemasin\surveybasemodels\tests\TestBaseActive;
10
11
/**
12
 * @author Tõnis Ormisson <[email protected]>
13
 */
14
class RatingTest extends TestBaseActive
15
{
16
17
    /** @var Rating */
18
    public $model;
19
20
    public $modelClass = Rating::class;
21
22
    /**
23
     * @return array
24
     */
25
    public function baseModelAttributes()
26
    {
27
        return array_merge([
28
            'rating_id' => 1,
29
            'respondent_id' => 1,
30
            'survey_id' => 1,
31
            'sample_id' => 1,
32
            'value' => 3.0,
33
            'comment' => "comment",
34
35
        ], parent::baseModelAttributes());
36
    }
37
    public function testTableName() {
38
        $this->assertEquals('rating', $this->model::tableName());
39
    }
40
41
}