PageTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 16
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testConstructSetsFields() 0 12 1
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