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.
Completed
Push — master ( 6c5077...d22a37 )
by Christian
01:33
created

SitemapDefintionTest::testItIsInstantiable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.9666
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * (c) Christian Gripp <[email protected]>
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace Core23\SitemapBundle\Tests\Definition;
11
12
use Core23\SitemapBundle\Definition\SitemapDefinition;
13
use Core23\SitemapBundle\Definition\SitemapDefinitionInterface;
14
use PHPUnit\Framework\TestCase;
15
16
class SitemapDefintionTest extends TestCase
17
{
18
    public function testItIsInstantiable(): void
19
    {
20
        $definition = new SitemapDefinition('acme.sitemap');
21
22
        $this->assertInstanceOf(SitemapDefinitionInterface::class, $definition);
23
        $this->assertSame('acme.sitemap', $definition->getType());
24
        $this->assertSame('acme.sitemap', $definition->toString());
25
        $this->assertSame([], $definition->getSettings());
26
    }
27
28
    public function testSetting(): void
29
    {
30
        $definition = new SitemapDefinition('acme.sitemap');
31
        $definition->setSettings([
32
            'foo'=> 'bar',
33
        ]);
34
35
        $this->assertSame('bar', $definition->getSetting('foo'));
36
    }
37
38
    public function testSettingWithDefault(): void
39
    {
40
        $definition = new SitemapDefinition('acme.sitemap');
41
42
        $this->assertSame('baz', $definition->getSetting('foo', 'baz'));
43
    }
44
45
    public function testTtl(): void
46
    {
47
        $definition = new SitemapDefinition('acme.sitemap', [
48
            'use_cache' => true,
49
            'ttl'       => 90,
50
        ]);
51
52
        $this->assertSame(90, $definition->getTtl());
53
    }
54
55
    public function testTtlDefault(): void
56
    {
57
        $definition = new SitemapDefinition('acme.sitemap');
58
59
        $this->assertSame(0, $definition->getTtl());
60
    }
61
}
62