assertHasQueryStringParameter()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace BeyondCode\DuskDashboard\Dusk\Concerns;
4
5
trait MakesUrlAssertions
6
{
7
    /** {@inheritdoc} */
8
    public function assertUrlIs($url)
9
    {
10
        $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this);
0 ignored issues
show
Bug introduced by
The property actionCollector does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
11
12
        return parent::assertUrlIs($url);
13
    }
14
15
    /** {@inheritdoc} */
16
    public function assertSchemeIs($scheme)
17
    {
18
        $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this);
19
20
        return parent::assertSchemeIs($scheme);
21
    }
22
23
    /** {@inheritdoc} */
24
    public function assertSchemeIsNot($scheme)
25
    {
26
        $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this);
27
28
        return parent::assertSchemeIsNot($scheme);
29
    }
30
31
    /** {@inheritdoc} */
32
    public function assertHostIs($host)
33
    {
34
        $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this);
35
36
        return parent::assertHostIs($host);
37
    }
38
39
    /** {@inheritdoc} */
40
    public function assertHostIsNot($host)
41
    {
42
        $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this);
43
44
        return parent::assertHostIsNot($host);
45
    }
46
47
    /** {@inheritdoc} */
48
    public function assertPortIs($port)
49
    {
50
        $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this);
51
52
        return parent::assertPortIs($port);
53
    }
54
55
    /** {@inheritdoc} */
56
    public function assertPortIsNot($port)
57
    {
58
        $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this);
59
60
        return parent::assertPortIsNot($port);
61
    }
62
63
    /** {@inheritdoc} */
64
    public function assertPathIs($path)
65
    {
66
        $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this);
67
68
        return parent::assertPathIs($path);
69
    }
70
71
    /** {@inheritdoc} */
72
    public function assertPathBeginsWith($path)
73
    {
74
        $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this);
75
76
        return parent::assertPathBeginsWith($path);
77
    }
78
79
    /** {@inheritdoc} */
80
    public function assertPathIsNot($path)
81
    {
82
        $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this);
83
84
        return parent::assertPathIsNot($path);
85
    }
86
87
    /** {@inheritdoc} */
88
    public function assertFragmentIs($fragment)
89
    {
90
        $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this);
91
92
        return parent::assertFragmentIs($fragment);
93
    }
94
95
    /** {@inheritdoc} */
96
    public function assertFragmentBeginsWith($fragment)
97
    {
98
        $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this);
99
100
        return parent::assertFragmentBeginsWith($fragment);
101
    }
102
103
    /** {@inheritdoc} */
104
    public function assertFragmentIsNot($fragment)
105
    {
106
        $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this);
107
108
        return parent::assertFragmentIsNot($fragment);
109
    }
110
111
    /** {@inheritdoc} */
112
    public function assertRouteIs($route, $parameters = [])
113
    {
114
        $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this);
115
116
        return parent::assertRouteIs($route, $parameters);
117
    }
118
119
    /** {@inheritdoc} */
120
    public function assertQueryStringHas($name, $value = null)
121
    {
122
        $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this);
123
124
        return parent::assertQueryStringHas($name, $value);
125
    }
126
127
    /** {@inheritdoc} */
128
    public function assertQueryStringMissing($name)
129
    {
130
        $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this);
131
132
        return parent::assertQueryStringMissing($name);
133
    }
134
135
    /** {@inheritdoc} */
136
    protected function assertHasQueryStringParameter($name)
137
    {
138
        $this->actionCollector->collect(__FUNCTION__, func_get_args(), $this);
139
140
        return parent::assertHasQueryStringParameter($name);
141
    }
142
}
143