Completed
Push — master ( a14055...bb6570 )
by Ankit
03:42
created

TestSession   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testPutValue() 0 7 1
A testGet() 0 5 1
1
<?php
2
namespace ChatApp\Tests;
3
4
use PHPUnit_Framework_TestCase;
5
use ChatApp\Session;
6
7
class TestSession
8
    extends
0 ignored issues
show
Coding Style introduced by
The extends keyword must be on the same line as the class name
Loading history...
9
        PHPUnit_Framework_TestCase
0 ignored issues
show
Coding Style introduced by
Expected 1 space before "PHPUnit_Framework_TestCase"; 8 found
Loading history...
10
{
11
12
13
    public function testPutValue()
14
    {
15
        $key = 'test';
16
        $value = 'test';
17
        Session::put($key, $value);
18
        return ['key' => $key, 'value' => $value];
19
    }
20
21
    /**
22
    * @depends testPutValue
23
    */
24
    public function testGet($array)
25
    {
26
        $value = Session::get($array['key']);
27
        $this->assertEquals(null, $value);
28
    }
29
}
30
31