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

ViewNamespacesTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 9
c 1
b 0
f 1
dl 0
loc 20
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A testGetWithFallbackFromConfigViewNamespace() 0 5 1
A testAddMultipleViewNamespace() 0 4 1
A testAddSingleViewNamespace() 0 5 1
1
<?php
2
3
namespace Backpack\CRUD\Tests\Unit\CrudPanel;
4
5
use Backpack\CRUD\ViewNamespaces;
6
use Config;
7
8
/**
9
 * @covers Backpack\CRUD\ViewNamespaces
10
 */
11
class ViewNamespacesTest extends BaseCrudPanelTest
12
{
13
    public function testAddSingleViewNamespace()
14
    {
15
        ViewNamespaces::addFor('fields', 'crud::fields');
16
        ViewNamespaces::addFor('fields', 'pro::fields');
17
        $this->assertCount(2, ViewNamespaces::getFor('fields'));
18
    }
19
20
    public function testAddMultipleViewNamespace()
21
    {
22
        ViewNamespaces::addFor('fields', ['crud::fields', 'pro::fields']);
23
        $this->assertCount(2, ViewNamespaces::getFor('fields'));
24
    }
25
26
    public function testGetWithFallbackFromConfigViewNamespace()
27
    {
28
        Config::set('backpack.crud.view_namespaces', ['fields' => ['config::fields']]);
29
        ViewNamespaces::addFor('fields', ['crud::fields', 'pro::fields']);
30
        $this->assertCount(3, ViewNamespaces::getFor('fields'));
31
    }
32
}
33