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
05:16
created

JsFooterViewHelperTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A pageRendererCallsAddJsFooterInlineCode() 0 20 1
1
<?php
2
3
namespace Kitodo\Dlf\Tests\Unit\ViewHelpers;
4
5
use Kitodo\Dlf\Tests\Functional\FunctionalTestCase;
6
use Kitodo\Dlf\ViewHelpers\JsFooterViewHelper;
7
use TYPO3\CMS\Core\Page\PageRenderer;
8
use TYPO3\CMS\Core\Utility\GeneralUtility;
9
use TYPO3\CMS\Fluid\View\StandaloneView;
10
11
/**
12
 * @covers JsFooterViewHelper
13
 */
14
class JsFooterViewHelperTest extends FunctionalTestCase
15
{
16
    /**
17
     * @var bool Speed up this test case, it needs no database
18
     */
19
    protected $initializeDatabase = false;
20
21
    /**
22
     * @test
23
     */
24
    public function pageRendererCallsAddJsFooterInlineCode(): void
25
    {
26
        $pageRendererProphecy = $this->getMockBuilder(PageRenderer::class)
27
            ->onlyMethods(['addJsFooterInlineCode'])
28
            ->getMock();
29
30
        $pageRendererProphecy->expects(self::once())->method('addJsFooterInlineCode')->with(
31
            'js-dlf-inline-footer', '$(document).ready(function() {});'
32
        );
33
34
        GeneralUtility::setSingletonInstance(PageRenderer::class, $pageRendererProphecy);
35
36
        $view = new StandaloneView();
37
        $view->setTemplateSource(
38
            '<html xmlns:kitodo="http://typo3.org/ns/Kitodo/Dlf/ViewHelpers">
39
                <kitodo:jsFooter inlineCode="$(document).ready(function() {});" />
40
            </html>'
41
        );
42
43
        $view->render();
44
    }
45
}
46