WebpageDTOTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 29
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testGetName() 0 4 1
A htmlDataProvider() 0 11 1
1
<?php
2
/**
3
 * File: WebpageDTOTest.php
4
 *
5
 * @author      Maciej Sławik <[email protected]>
6
 * Github:      https://github.com/maciejslawik
7
 */
8
9
namespace MSlwk\Otomoto\Middleware\Test\Unit\Webpage\Data;
10
11
use MSlwk\Otomoto\Middleware\Webpage\Data\WebpageDTO;
12
use PHPUnit\Framework\TestCase;
13
14
/**
15
 * Class WebpageDTOTest
16
 * @package MSlwk\Otomoto\Middleware\Test\Unit\Webpage\Data
17
 */
18
class WebpageDTOTest extends TestCase
19
{
20
    /**
21
     * @return array
22
     */
23
    public function htmlDataProvider()
24
    {
25
        return [
26
            [
27
                'html1'
28
            ],
29
            [
30
                'html2'
31
            ],
32
            [
33
                'html3'
34
            ],
35
        ];
36
    }
37
38
    /**
39
     * @test
40
     * @dataProvider htmlDataProvider
41
     * @param $html
42
     */
43
    public function testGetName($html)
44
    {
45
        $webpageDTO = new WebpageDTO($html);
46
        $this->assertEquals($html, $webpageDTO->getHtml());
47
    }
48
}
49