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

GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Pull Request — master (#902)
by
unknown
03:43
created

MetadataWrapVariableViewHelperTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 15
c 1
b 0
f 0
dl 0
loc 35
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A renderingContextCallsGetVariableProviderAdd() 0 25 1
1
<?php
2
3
namespace Kitodo\Dlf\Tests\Unit\ViewHelpers;
4
5
use Kitodo\Dlf\Tests\Functional\FunctionalTestCase;
6
use Kitodo\Dlf\ViewHelpers\MetadataWrapVariableViewHelper;
7
use TYPO3\CMS\Fluid\View\StandaloneView;
8
use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextFactory;
0 ignored issues
show
Bug introduced by
The type TYPO3\CMS\Fluid\Core\Ren...RenderingContextFactory was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
9
10
/**
11
 * @covers MetadataWrapVariableViewHelper
12
 */
13
class MetadataWrapVariableViewHelperTest extends FunctionalTestCase
14
{
15
    /**
16
     * @var bool Speed up this test case, it needs no database
17
     */
18
    protected $initializeDatabase = false;
19
20
    /**
21
     * @test
22
     */
23
    public function renderingContextCallsGetVariableProviderAdd(): void
24
    {
25
        $view = new StandaloneView();
26
27
        $view->assign('configObject',
28
            [ 'wrap' => 'all.wrap = <article class="shlb-metadata-text-item metadata-title">|</article>
29
                 key.wrap = <label>|</label>
30
                 value.required = 1
31
                 value.wrap = <li>|</li>'
32
            ]
33
        );
34
        $view->setTemplateSource(
35
            '<html xmlns:kitodo="http://typo3.org/ns/Kitodo/Dlf/ViewHelpers">
36
                {configObject.wrap -> kitodo:metadataWrapVariable(name: \'metadataWrap\')}
37
            </html>'
38
        );
39
        $view->render();
40
41
        $this->assertEquals(
42
            [
43
                'key' => ['wrap' => '<label>|</label>'],
44
                'value' => ['required' => 1, 'wrap' => '<li>|</li>'],
45
                'all' => ['wrap' => '<article class="shlb-metadata-text-item metadata-title">|</article>']
46
            ],
47
            $view->getRenderingContext()->getVariableProvider()->get('metadataWrap')
48
        );
49
    }
50
}
51