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 — dev-extbase-fluid (#756)
by
unknown
04:10
created

HelperTest::validXmlIsAccepted()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 9
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 11
rs 9.9666
1
<?php
2
3
namespace Kitodo\Dlf\Tests\Unit\Common;
4
5
use Kitodo\Dlf\Common\Helper;
6
use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
7
8
class HelperTest extends UnitTestCase
9
{
10
    public function assertInvalidXml($xml)
11
    {
12
        $result = Helper::getXmlFileAsString($xml);
13
        $this->assertEquals(false, $result);
14
    }
15
16
    /**
17
     * @test
18
     * @group getXmlFileAsString
19
     */
20
    public function invalidXmlYieldsFalse(): void
21
    {
22
        $this->assertInvalidXml(false);
23
        $this->assertInvalidXml(null);
24
        $this->assertInvalidXml(1);
25
        $this->assertInvalidXml([]);
26
        $this->assertInvalidXml(new \stdClass());
27
        $this->assertInvalidXml('');
28
        $this->assertInvalidXml('not xml');
29
        $this->assertInvalidXml('<tag-not-closed>');
30
    }
31
32
    /**
33
     * @test
34
     * @group getXmlFileAsString
35
     */
36
    public function validXmlIsAccepted(): void
37
    {
38
        $xml = <<<XML
39
<?xml version="1.0" encoding="UTF-8"?>
40
<root>
41
    <single />
42
</root>
43
XML;
44
        $node = Helper::getXmlFileAsString($xml);
45
        $this->assertIsObject($node);
46
        $this->assertEquals('root', $node->getName());
47
    }
48
}
49