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

StackTest::testPop()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
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\Integration;
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 testEmpty()
22
    {
23
        $stack = array();
24
        $this->assertEmpty($stack);
25
 
26
        return $stack;
27
    }
28
 
29
    /**
30
     * @depends testEmpty
31
     */
32
    public function testPush(array $stack)
33
    {
34
        array_push($stack, 'foo');
35
        $this->assertEquals('foo', $stack[count($stack) - 1]);
36
        $this->assertNotEmpty($stack);
37
 
38
        return $stack;
39
    }
40
 
41
    /**
42
     * @depends testPush
43
     */
44
    public function testPop(array $stack)
45
    {
46
        $this->assertEquals('foo', array_pop($stack));
47
        $this->assertEmpty($stack);
48
    }
49
}
50