PageTest::testConstructSetsFields()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 12
rs 9.8666
c 0
b 0
f 0
1
<?php
2
3
namespace Tests\Unit\SubPageList\Lister;
4
5
use PHPUnit\Framework\TestCase;
6
use SubPageList\Lister\Page;
7
8
/**
9
 * @covers \SubPageList\Lister\Page
10
 *
11
 * @group SubPageList
12
 *
13
 * @licence GNU GPL v2+
14
 * @author Jeroen De Dauw < [email protected] >
15
 */
16
class PageTest extends TestCase {
17
18
	public function testConstructSetsFields() {
19
		$title = $this->createMock( 'Title' );
20
		$children = [
21
			new Page( $this->createMock( 'Title' ) ),
22
			new Page( $this->createMock( 'Title' ) )
23
		];
24
25
		$page = new Page( $title, $children );
26
27
		$this->assertEquals( $title, $page->getTitle() );
28
		$this->assertEquals( $children, $page->getSubPages() );
29
	}
30
31
}
32