Passed
Push — master ( 1a6375...8f4058 )
by Petr
08:21 queued 05:12
created

LangTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 9
c 0
b 0
f 0
dl 0
loc 16
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testOwn() 0 7 1
A testNone() 0 5 1
1
<?php
2
3
namespace tests\ChecksTests\TraitsTests;
4
5
6
use tests\CommonTestClass;
7
use kalanis\kw_mime\Translations;
8
9
10
class LangTest extends CommonTestClass
11
{
12
    public function testOwn(): void
13
    {
14
        $lib = new XLang();
15
        $lib->setMiLang(new XTrLang());
16
        $this->assertInstanceOf(XTrLang::class, $lib->getMiLang());
17
        $this->assertInstanceOf(Translations::class, $lib->getMiLang());
18
        $this->assertEquals('test data', $lib->getMiLang()->miNoStorage());
19
    }
20
21
    public function testNone(): void
22
    {
23
        $lib = new XLang();
24
        $this->assertInstanceOf(Translations::class, $lib->getMiLang());
25
        $this->assertEquals('No storage set!', $lib->getMiLang()->miNoStorage());
26
    }
27
}
28