ParsedownTest::testSingletonWorks()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 2
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 5
rs 10
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