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

Passed
Push — bassets ( 438f93...6e306b )
by Cristian
37:11 queued 22:16
created

ViewNamespacesTest::testAddMultipleViewNamespace()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 2
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 4
rs 10
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.fallback_namespace', ['fields' => ['fallback::fields']]);
29
        Config::set('backpack.crud.view_namespaces', ['fields' => ['config::fields']]);
30
        ViewNamespaces::addFor('fields', ['crud::fields', 'pro::fields']);
31
        $this->assertCount(4, ViewNamespaces::getWithFallbackFor('fields', 'backpack.crud.fallback_namespace.fields'));
32
    }
33
34
    public function testItCanGetTheViewPathsForGivenElement()
35
    {
36
        ViewNamespaces::addFor('fields', ['crud::fields', 'pro::fields']);
37
        $viewPaths = ViewNamespaces::getViewPathsFor('fields', 'test');
38
        $this->assertCount(2, $viewPaths);
39
        $this->assertEquals(['crud::fields.test', 'pro::fields.test'], array_values($viewPaths));
40
    }
41
}
42