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

Completed
Push — master ( 861d7d...2ad8d1 )
by Cristian
04:38
created

CrudPanelDeleteTest::testDelete()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 8
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 14
rs 9.4285
1
<?php
2
3
namespace Backpack\CRUD\Tests\Unit\CrudPanel;
4
5
use Illuminate\Support\Facades\DB;
6
use Backpack\CRUD\Tests\Unit\Models\Article;
7
use Illuminate\Database\Eloquent\ModelNotFoundException;
8
9
class CrudPanelDeleteTest extends BaseDBCrudPanelTest
10
{
11
    public function testDelete()
12
    {
13
        $this->markTestIncomplete('Not correctly implemented');
14
15
        $this->crudPanel->setModel(Article::class);
16
        $article = Article::find(1);
17
18
        $wasDeleted = $this->crudPanel->delete($article->id);
19
20
        // TODO: the delete method should not convert the returned result to a string
21
        $deletedArticle = Article::find(1);
22
        $this->assertTrue($wasDeleted);
23
        $this->assertNull($deletedArticle);
24
    }
25
26 View Code Duplication
    public function testDeleteUnknown()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
27
    {
28
        $this->setExpectedException(ModelNotFoundException::class);
29
30
        $this->crudPanel->setModel(Article::class);
31
        $unknownId = DB::getPdo()->lastInsertId() + 1;
32
33
        $this->crudPanel->delete($unknownId);
34
    }
35
}
36