Passed
Branch master (e94900)
by judicael
03:54
created

Exemple1Test::testShow()   A

Complexity

Conditions 3
Paths 8

Size

Total Lines 23
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
c 2
b 1
f 0
dl 0
loc 23
rs 9.0856
cc 3
eloc 12
nc 8
nop 0
1
<?php
2
3
/**
4
 * Controller to test
5
 *
6
 * @category  	tests
7
 * @package   	tests\Demo\Controller
8
 * @author    	Judicaël Paquet <[email protected]>
9
 * @copyright 	Copyright (c) 2013-2016 PAQUET Judicaël FR Inc. (https://github.com/las93)
10
 * @license   	https://github.com/las93/venus3/blob/master/LICENSE.md Tout droit réservé à PAQUET Judicaël
11
 * @version   	Release: 1.0.0
12
 * @filesource	https://github.com/las93/venus3
13
 * @link      	https://github.com/las93
14
 * @since     	1.0
15
 */
16
17
namespace Venus\tests\Demo\Controller;
18
19
use Venus\src\Demo\Controller\Exemple1;
20
21
/**
22
 * Controller to test
23
 *
24
 * @category  	tests
25
 * @package   	tests\Demo\Controller
26
 * @author    	Judicaël Paquet <[email protected]>
27
 * @copyright 	Copyright (c) 2013-2016 PAQUET Judicaël FR Inc. (https://github.com/las93)
28
 * @license   	https://github.com/las93/venus3/blob/master/LICENSE.md Tout droit réservé à PAQUET Judicaël
29
 * @version   	Release: 1.0.0
30
 * @filesource	https://github.com/las93/venus3
31
 * @link      	https://github.com/las93
32
 * @since     	1.0
33
 */
34
35
class Exemple1Test extends \PHPUnit_Framework_TestCase
36
{
37
	/**
38
	 * the main page
39
	 *
40
	 * @access public
41
	 * @return void
42
     * @test
43
	 */
44
45
	public function testShow()
46
    {
47
	    try {
48
49
            ob_start();
50
            $exemple1 = new Exemple1;
51
            $exemple1->show();
52
            $content = ob_get_clean();
53
54
            //var_dump(debug_backtrace());
0 ignored issues
show
Unused Code Comprehensibility introduced by
72% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
55
56
            if ($content) {
57
58
                $this->assertTrue(true);
59
            }
60
            else {
61
                $this->assertTrue(false);
62
            }
63
        }
64
        catch(\Exception $e) {
65
            $this->assertTrue(false);
66
        }
67
	}
68
}