Completed
Push — master ( 5eda5d...617b3a )
by Axel
05:41
created

StackTest::testPushAndPop()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 7
nc 1
nop 0
dl 0
loc 11
rs 10
c 1
b 0
f 0
1
<?php
2
3
/**
4
 * Routes.
5
 *
6
 * @copyright Zikula contributors (Zikula)
7
 * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License
8
 * @author Zikula contributors <[email protected]>.
9
 * @see https://ziku.la
10
 * @version Generated by ModuleStudio 1.4.0 (https://modulestudio.de).
11
 */
12
13
declare(strict_types=1);
14
15
namespace Zikula\RoutesModule\Tests\Unit;
16
17
use PHPUnit\Framework\TestCase;
0 ignored issues
show
Bug introduced by
The type PHPUnit\Framework\TestCase was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
18
19
class StackTest extends TestCase
20
{
21
    public function testPushAndPop()
22
    {
23
        $stack = array();
24
        $this->assertEquals(0, count($stack));
25
26
        array_push($stack, 'foo');
27
        $this->assertEquals('foo', $stack[count($stack) - 1]);
28
        $this->assertEquals(1, count($stack));
29
30
        $this->assertEquals('foo', array_pop($stack));
31
        $this->assertEquals(0, count($stack));
32
    }
33
}
34