Completed
Push — master ( baf9c0...cf2f5b )
by Wanderson
02:20
created

ViewTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 23
rs 10
wmc 3
lcom 0
cbo 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A testViewNotFound() 0 4 1
A testViewIndex() 0 4 1
A testToString() 0 7 1
1
<?php
2
3
namespace Win\Mvc;
4
5
use Win\Mvc\View;
6
7
class ViewTest extends \PHPUnit_Framework_TestCase {
8
9
	public function testViewNotFound() {
10
		$view = new View('this-view-doesnt-exist');
11
		$this->assertFalse($view->exists());
12
	}
13
14
	public function testViewIndex() {
15
		$view = new View('index');
16
		$this->assertTrue($view->exists());
17
	}
18
19
	public function testToString() {
20
		$viewEmpty = new View('this-file-doent-exist');
21
		$this->assertEquals(0, strlen($viewEmpty->toString()));
22
23
		$viewNotEmpty = new View('index');
24
		$this->assertNotEquals(0, strlen($viewNotEmpty->toString()));
25
	}
26
27
	
28
29
}
30