SyntaxHighlighterProviderTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
eloc 7
dl 0
loc 27
rs 10
c 2
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A test__construct() 0 8 1
A testGetSyntaxHighlighterStrings() 0 5 1
1
<?php
2
3
/*
4
 * This file is part of the core-bundle package.
5
 *
6
 * (c) 2018 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Bundle\CoreBundle\Tests\Provider;
13
14
use WBW\Bundle\CoreBundle\Assets\SyntaxHighlighter\SyntaxHighlighterStrings;
15
use WBW\Bundle\CoreBundle\Provider\SyntaxHighlighterProvider;
16
use WBW\Bundle\CoreBundle\Provider\SyntaxHighlighterProviderInterface;
17
use WBW\Bundle\CoreBundle\Tests\AbstractTestCase;
18
use WBW\Library\Symfony\Provider\ProviderInterface;
19
20
/**
21
 * SyntaxHighlighter provider test.
22
 *
23
 * @author webeweb <https://github.com/webeweb>
24
 * @package WBW\Bundle\CoreBundle\Tests\Provider
25
 */
26
class SyntaxHighlighterProviderTest extends AbstractTestCase {
27
28
    /**
29
     * Test getSyntaxHighlighterStrings()
30
     *
31
     * @return void
32
     */
33
    public function testGetSyntaxHighlighterStrings(): void {
34
35
        $obj = new SyntaxHighlighterProvider($this->translator);
36
37
        $this->assertInstanceOf(SyntaxHighlighterStrings::class, $obj->getSyntaxHighlighterStrings());
38
    }
39
40
    /**
41
     * Test __construct()
42
     *
43
     * @return void
44
     */
45
    public function test__construct(): void {
46
47
        $this->assertEquals("wbw.core.provider.syntax_highlighter", SyntaxHighlighterProvider::SERVICE_NAME);
48
49
        $obj = new SyntaxHighlighterProvider($this->translator);
50
51
        $this->assertInstanceOf(ProviderInterface::class, $obj);
52
        $this->assertInstanceOf(SyntaxHighlighterProviderInterface::class, $obj);
53
    }
54
}
55