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 Failed
Pull Request — main (#4778)
by Pedro
25:44 queued 10:58
created

CrudPanelDeleteTest::testDeleteUnknown()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 8
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\Article;
6
use Illuminate\Database\Eloquent\ModelNotFoundException;
7
use Illuminate\Support\Facades\DB;
8
9
/**
10
 * @covers Backpack\CRUD\app\Library\CrudPanel\Traits\Delete
11
 */
12
class CrudPanelDeleteTest extends BaseDBCrudPanelTest
13
{
14
    public function testDelete()
15
    {
16
        $this->markTestIncomplete('Not correctly implemented');
17
18
        $this->crudPanel->setModel(Article::class);
19
        $article = Article::find(1);
20
21
        $wasDeleted = $this->crudPanel->delete($article->id);
22
23
        // TODO: the delete method should not convert the returned result to a string
24
        $deletedArticle = Article::find(1);
25
        $this->assertTrue($wasDeleted);
26
        $this->assertNull($deletedArticle);
27
    }
28
29
    public function testDeleteUnknown()
30
    {
31
        $this->expectException(ModelNotFoundException::class);
32
33
        $this->crudPanel->setModel(Article::class);
34
        $unknownId = DB::getPdo()->lastInsertId() + 1;
35
36
        $this->crudPanel->delete($unknownId);
37
    }
38
39
    public function testItAddsTheBulkDeleteButton()
40
    {
41
        $this->crudPanel->addBulkDeleteButton();
42
        $this->assertCount(1, $this->crudPanel->buttons());
43
    }
44
}
45