Completed
Push — develop ( 183c36...cfc9ab )
by Stéphane
02:42
created

Content   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
lcom 0
cbo 1
dl 0
loc 22
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testGet() 0 8 1
A testWithBom() 0 8 1
1
<?php
2
/**
3
 * This file is part of the beebot package.
4
 * For the full copyright and license information, please view the LICENSE
5
 * file that was distributed with this source code.
6
 *
7
 * @copyright Bee4 2016
8
 * @author    Stephane HULARD <[email protected]>
9
 */
10
11
namespace Bee4\RobotsTxt\Test\Units;
12
13
use mageekguy\atoum;
14
use Bee4\RobotsTxt\Content as SUT;
15
16
/**
17
 * Content unit test
18
 */
19
class Content extends atoum
20
{
21
    const CONTENT = 'A sample content';
22
23
    public function testGet()
24
    {
25
        $this
26
            ->given($sut = new SUT(self::CONTENT))
27
            ->then
28
                ->string($sut->get())
29
                    ->isEqualTo(self::CONTENT);
30
    }
31
32
    public function testWithBom()
33
    {
34
        $this
35
            ->given($sut = new SUT(SUT::UTF8_BOM.self::CONTENT))
36
            ->then
37
                ->string($sut->get())
38
                    ->isEqualTo(self::CONTENT);
39
    }
40
}
41