Completed
Push — master ( 062664...e5b3ec )
by Níckolas Daniel
05:10
created

EpisodeSlugBuilderTest::testSlugDefaultFormat()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace PODEntender\Domain\Model\Post;
4
5
use PHPUnit\Framework\TestCase;
6
7
class EpisodeSlugBuilderTest extends TestCase
8
{
9
    /** @var EpisodeSlugBuilder */
10
    private $slugBuilder;
11
12
    protected function setUp(): void
13
    {
14
        $this->slugBuilder = new EpisodeSlugBuilder();
15
    }
16
17
    public function testForcingEpisodeSlugIsPrefixed(): void
18
    {
19
        $slug = $this->slugBuilder->build('999', '000', 'forced/slug');
20
21
        $this->assertEquals('episodio/forced/slug', $slug);
22
    }
23
24
    public function testSlugDefaultFormat(): void
25
    {
26
        $slug = $this->slugBuilder->build('020', 'This is a testing title', null);
27
28
        $this->assertEquals('episodio/020-this-is-a-testing-title', $slug);
29
    }
30
}
31