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 (990)

Branch: next

tests/Unit/CrudPanel/CrudPanelMacroTest.php (2 issues)

1
<?php
2
3
namespace Backpack\CRUD\Tests\Unit\CrudPanel;
4
5
use Backpack\CRUD\Tests\config\CrudPanel\BaseCrudPanel;
6
7
/**
8
 * @covers Backpack\CRUD\app\Library\CrudPanel\Traits\Macroable
9
 */
10
class CrudPanelMacroTest extends BaseCrudPanel
11
{
12
    public function testItCanRegisterMacro()
13
    {
14
        $this->crudPanel::macro('validMacro', function () {
15
            return true;
16
        });
17
18
        $this->assertTrue($this->crudPanel->validMacro());
19
    }
20
21
    public function testThrowsErrorIfMacroExists()
22
    {
23
        try {
24
            $this->crudPanel::macro('setModel', function () {
25
                return true;
26
            });
27
        } catch (\Throwable $e) {
0 ignored issues
show
Coding Style Comprehensibility introduced by
Consider adding a comment why this CATCH block is empty.
Loading history...
28
        }
29
        $this->assertEquals(
30
            new \Symfony\Component\HttpKernel\Exception\HttpException(500, 'Cannot register \'setModel\' macro. \'setModel()\' already exists on Backpack\CRUD\app\Library\CrudPanel\CrudPanel', null, ['developer-error-exception']),
31
            $e
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $e does not seem to be defined for all execution paths leading up to this point.
Loading history...
32
        );
33
    }
34
}
35