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

Issues (892)

Branch: main

Unit/CrudPanel/CrudPanelTitlesAndHeadingsTest.php (3 issues)

Labels
Severity
1
<?php
2
3
namespace Backpack\CRUD\Tests\Unit\CrudPanel;
4
5
use Backpack\CRUD\Tests\config\Models\User;
6
7
/**
8
 * @covers Backpack\CRUD\app\Library\CrudPanel\Traits\HeadingsAndTitles
9
 * @covers Backpack\CRUD\app\Library\CrudPanel\CrudPanel
10
 */
11
class CrudPanelTitlesAndHeadingsTest extends \Backpack\CRUD\Tests\config\CrudPanel\BaseCrudPanel
12
{
13
    public function testItCanSetAndGetTheTitleFromTheAction()
14
    {
15
        $this->crudPanel->setTitle('test', 'create');
16
        $this->assertEquals('test', $this->crudPanel->getTitle('create'));
0 ignored issues
show
'create' of type string is incompatible with the type boolean expected by parameter $action of Backpack\CRUD\app\Librar...l\CrudPanel::getTitle(). ( Ignorable by Annotation )

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

16
        $this->assertEquals('test', $this->crudPanel->getTitle(/** @scrutinizer ignore-type */ 'create'));
Loading history...
17
        $this->assertEquals($this->crudPanel->get('create.title'), $this->crudPanel->getTitle('create'));
18
    }
19
20
    public function testItCanSetAndGetTheHeadingFromTheAction()
21
    {
22
        $this->crudPanel->setHeading('test', 'create');
23
        $this->assertEquals('test', $this->crudPanel->getHeading('create'));
0 ignored issues
show
'create' of type string is incompatible with the type boolean expected by parameter $action of Backpack\CRUD\app\Librar...CrudPanel::getHeading(). ( Ignorable by Annotation )

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

23
        $this->assertEquals('test', $this->crudPanel->getHeading(/** @scrutinizer ignore-type */ 'create'));
Loading history...
24
        $this->assertEquals($this->crudPanel->get('create.heading'), $this->crudPanel->getHeading('create'));
25
    }
26
27
    public function testItCanSetAndGetTheSubheadingFromTheAction()
28
    {
29
        $this->crudPanel->setSubheading('test', 'create');
30
        $this->assertEquals('test', $this->crudPanel->getSubheading('create'));
0 ignored issues
show
'create' of type string is incompatible with the type boolean expected by parameter $action of Backpack\CRUD\app\Librar...dPanel::getSubheading(). ( Ignorable by Annotation )

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

30
        $this->assertEquals('test', $this->crudPanel->getSubheading(/** @scrutinizer ignore-type */ 'create'));
Loading history...
31
        $this->assertEquals($this->crudPanel->get('create.subheading'), $this->crudPanel->getSubheading('create'));
32
    }
33
34
    public function testItCanSetAndGetTheSubheading()
35
    {
36
        $this->crudPanel->setModel(User::class);
37
        $this->setupUserCreateRequest();
38
39
        $this->crudPanel->setOperation('create');
40
        $this->crudPanel->setSubheading('test');
41
        $this->assertEquals('test', $this->crudPanel->getSubheading());
42
        $this->assertEquals($this->crudPanel->get('create.subheading'), $this->crudPanel->getSubheading());
43
    }
44
45
    public function testItCanSetAndGetTheHeading()
46
    {
47
        $this->crudPanel->setModel(User::class);
48
        $this->setupUserCreateRequest();
49
50
        $this->crudPanel->setOperation('create');
51
        $this->crudPanel->setHeading('test');
52
        $this->assertEquals('test', $this->crudPanel->getHeading());
53
        $this->assertEquals($this->crudPanel->get('create.heading'), $this->crudPanel->getHeading());
54
    }
55
56
    public function testItCanSetAndGetTheTitle()
57
    {
58
        $this->crudPanel->setModel(User::class);
59
        $this->setupUserCreateRequest();
60
61
        $this->crudPanel->setOperation('create');
62
        $this->crudPanel->setTitle('test');
63
64
        $this->assertEquals('test', $this->crudPanel->getTitle());
65
        $this->assertEquals($this->crudPanel->get('create.title'), $this->crudPanel->getTitle());
66
    }
67
}
68