Passed
Push — master ( ea6259...fd9feb )
by Caen
03:52 queued 11s
created

HasTableOfContentsTest::testHasTableOfContentsProperty()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Hyde\Framework\Testing\Unit;
4
5
use Hyde\Framework\Concerns\HasTableOfContents;
6
use Hyde\Testing\TestCase;
7
8
/**
9
 * Class HasTableOfContentsTest.
10
 *
11
 * @covers \Hyde\Framework\Concerns\HasTableOfContents
12
 *
13
 * @see \Hyde\Framework\Testing\Feature\Actions\GeneratesSidebarTableOfContentsTest
14
 */
15
class HasTableOfContentsTest extends TestCase
16
{
17
    use HasTableOfContents;
18
19
    public function testConstructorCreatesTableOfContentsString()
20
    {
21
        $this->body = '## Title';
0 ignored issues
show
Bug Best Practice introduced by
The property body does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
22
        $this->assertEquals('<ul class="table-of-contents"><li><a href="#title">Title</a></li></ul>', str_replace("\n", '', $this->getTableOfContents()));
23
    }
24
}
25