TitleTagTest::testRenderTitleOnly()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 11
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 7
nc 1
nop 0
1
<?php
2
3
namespace Leogout\Bundle\SeoBundle\Tests\Model;
4
5
use Leogout\Bundle\SeoBundle\Model\TitleTag;
6
use Leogout\Bundle\SeoBundle\Tests\TestCase;
7
8
/**
9
 * Description of TitleTagTest.
10
 *
11
 * @author: leogout
12
 */
13
class TitleTagTest extends TestCase
14
{
15
    public function testRender()
16
    {
17
        $titleTag = new TitleTag();
18
        $titleTag->setContent('Awesonme | Site');
19
20
        $this->assertEquals(
21
            '<title>Awesonme | Site</title>',
22
            $titleTag->render()
23
        );
24
    }
25
26
    public function testRenderTitleOnly()
27
    {
28
        $titleTag = new TitleTag();
29
        $titleTag
30
            ->setContent('Site');
31
32
        $this->assertEquals(
33
            '<title>Site</title>',
34
            $titleTag->render()
35
        );
36
    }
37
38
    public function testRenderNothing()
39
    {
40
        $titleTag = new TitleTag();
41
42
        $this->assertEquals(
43
            '<title></title>',
44
            $titleTag->render()
45
        );
46
    }
47
}
48