ParsedownTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 7
c 1
b 0
f 1
dl 0
loc 21
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A testSingletonWorks() 0 5 1
A testHelperWorks() 0 5 1
A testFacadeWorks() 0 5 1
1
<?php
2
3
namespace Yansongda\LaravelParsedown\Tests\Facades;
4
5
use Yansongda\LaravelParsedown\Facades\Parsedown;
6
use Yansongda\LaravelParsedown\Tests\TestCase;
7
8
class ParsedownTest extends TestCase
9
{
10
    public function testHelperWorks()
11
    {
12
        $result = parsedown('# Heading 1');
13
14
        $this->assertEquals('<h1>Heading 1</h1>', $result);
15
    }
16
17
    public function testFacadeWorks()
18
    {
19
        $result = Parsedown::text('# Heading 1');
20
21
        $this->assertEquals('<h1>Heading 1</h1>', $result);
22
    }
23
24
    public function testSingletonWorks()
25
    {
26
        $result = app('parsedown')->text('# Heading 1');
27
28
        $this->assertEquals('<h1>Heading 1</h1>', $result);
29
    }
30
}
31