Completed
Push — add_bdd ( 07502f )
by Anatoliy
07:38
created

Buffer::calledMethodThrowException()   A

Complexity

Conditions 1
Paths 0

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 0
nop 0
1
<?php
2
declare(strict_types=1);
3
4
use Behat\Behat\Context\Context;
5
use Behat\Behat\Tester\Exception\PendingException;
6
7
8
/**
9
 * Defines application Behat from the specific context.
10
 */
11
class Buffer implements Context
12
{
13
14
    public $variableList = [];
15
16
    /**
17
     * Initializes context.
18
     *
19
     * Every scenario gets its own context instance.
20
     * You can also pass arbitrary arguments to the
21
     * context constructor through behat.yml.
22
     */
23
    public function __construct()
24
    {
25
26
        $this->variableList['PID current process'] = getmypid();
27
    }
28
29
    /**
30
     * @Given a non existed file as $:arg1
31
     */
32
    public function aNonExistedFileAs($arg1)
33
    {
34
        $arg1 = str_replace("$", "", $arg1);
35
        $this->variableList[$arg1] = sys_get_temp_dir() . '/' . uniqid('vd_', true);;
36
    }
37
38
39
40
41
42
43
    /**
44
     * @Given an existed file named :arg1 with no write access
45
     */
46
    public function anExistedFileNamedWithNoWriteAccess($arg1)
0 ignored issues
show
Unused Code introduced by
The parameter $arg1 is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

46
    public function anExistedFileNamedWithNoWriteAccess(/** @scrutinizer ignore-unused */ $arg1)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
47
    {
48
        throw new PendingException();
49
    }
50
51
    /**
52
     * @Then called method throw Exception.
53
     */
54
    public function calledMethodThrowException()
55
    {
56
        throw new PendingException();
57
    }
58
59
60
    /**
61
     * @Given a non existed file named :arg1
62
     */
63
    public function aNonExistedFileNamed($arg1)
0 ignored issues
show
Unused Code introduced by
The parameter $arg1 is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

63
    public function aNonExistedFileNamed(/** @scrutinizer ignore-unused */ $arg1)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
64
    {
65
        throw new PendingException();
66
    }
67
68
69
    /**
70
     * @Given a non existed file as :arg1
71
     */
72
    public function aNonExistedFileAs2($arg1)
0 ignored issues
show
Unused Code introduced by
The parameter $arg1 is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

72
    public function aNonExistedFileAs2(/** @scrutinizer ignore-unused */ $arg1)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
73
    {
74
        throw new PendingException();
75
    }
76
77
    /**
78
     * @Given an existed file named :arg1
79
     */
80
    public function anExistedFileNamed($arg1)
0 ignored issues
show
Unused Code introduced by
The parameter $arg1 is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

80
    public function anExistedFileNamed(/** @scrutinizer ignore-unused */ $arg1)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
81
    {
82
        throw new PendingException();
83
    }
84
}
85