Completed
Push — master ( 9e8b20...f27a06 )
by Vitaly
09:55 queued 07:35
created

CMSMainTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 16
rs 10
1
<?php
2
namespace tests;
3
4
/**
5
 * Created by Vitaly Iegorov <[email protected]>
6
 * on 04.08.14 at 16:42
7
 */
8
class CMSMainTest extends \PHPUnit_Framework_TestCase
9
{
10
    public function testPushAndPop()
11
    {
12
        $stack = array();
13
        $this->assertEquals(0, count($stack));
14
15
        array_push($stack, 'foo');
16
        $this->assertEquals('foo', $stack[count($stack)-1]);
17
        $this->assertEquals(1, count($stack));
18
19
        // Change to make push
20
        $this->assertEquals('foo', array_pop($stack));
21
        $this->assertEquals(0, count($stack));
22
    }
23
}
24