Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Test Setup Failed
Push — master ( 82f512...2f1651 )
by Cristian
13:55 queued 02:59
created

CrudPanelTest::testSetRouteName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Backpack\CRUD\Tests\Unit\CrudPanel;
4
5
use Backpack\CRUD\Tests\Unit\Models\TestModel;
6
use Illuminate\Database\Eloquent\Builder;
7
8
class CrudPanelTest extends BaseCrudPanelTest
9
{
10
    public function testSetModelFromModelClass()
11
    {
12
        $this->crudPanel->setModel(TestModel::class);
13
14
        $this->assertEquals($this->model, $this->crudPanel->model);
15
        $this->assertInstanceOf(TestModel::class, $this->crudPanel->model);
16
        $this->assertInstanceOf(Builder::class, $this->crudPanel->query);
17
    }
18
19
    public function testSetModelFromModelClassName()
20
    {
21
        $modelClassName = '\Backpack\CRUD\Tests\Unit\Models\TestModel';
22
23
        $this->crudPanel->setModel($modelClassName);
24
25
        $this->assertEquals($this->model, $this->crudPanel->model);
26
        $this->assertInstanceOf($modelClassName, $this->crudPanel->model);
0 ignored issues
show
Bug introduced by
$modelClassName of type object is incompatible with the type string expected by parameter $expected of PHPUnit\Framework\Assert::assertInstanceOf(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

26
        $this->assertInstanceOf(/** @scrutinizer ignore-type */ $modelClassName, $this->crudPanel->model);
Loading history...
27
        $this->assertInstanceOf(Builder::class, $this->crudPanel->query);
28
    }
29
30
    public function testSetUnknownModel()
31
    {
32
        $this->expectException(\Exception::class);
33
34
        $this->crudPanel->setModel('\Foo\Bar');
35
    }
36
37
    public function testSetUnknownRouteName()
38
    {
39
        $this->expectException(\Exception::class);
40
41
        $this->crudPanel->setRouteName('unknown.route.name');
42
    }
43
44
    public function testSync()
45
    {
46
        $this->markTestIncomplete();
47
48
        // TODO: the sync method should not be in the CrudPanel class and should not be exposed in the public API.
49
        //       it is a utility method and should be refactored.
50
    }
51
}
52