1 | <?php |
||
5 | trait MakesUrlAssertions |
||
6 | { |
||
7 | /** {@inheritdoc} */ |
||
8 | public function assertUrlIs($url) |
||
14 | |||
15 | /** {@inheritdoc} */ |
||
16 | public function assertSchemeIs($scheme) |
||
22 | |||
23 | /** {@inheritdoc} */ |
||
24 | public function assertSchemeIsNot($scheme) |
||
30 | |||
31 | /** {@inheritdoc} */ |
||
32 | public function assertHostIs($host) |
||
38 | |||
39 | /** {@inheritdoc} */ |
||
40 | public function assertHostIsNot($host) |
||
46 | |||
47 | /** {@inheritdoc} */ |
||
48 | public function assertPortIs($port) |
||
54 | |||
55 | /** {@inheritdoc} */ |
||
56 | public function assertPortIsNot($port) |
||
62 | |||
63 | /** {@inheritdoc} */ |
||
64 | public function assertPathIs($path) |
||
70 | |||
71 | /** {@inheritdoc} */ |
||
72 | public function assertPathBeginsWith($path) |
||
78 | |||
79 | /** {@inheritdoc} */ |
||
80 | public function assertPathIsNot($path) |
||
86 | |||
87 | /** {@inheritdoc} */ |
||
88 | public function assertFragmentIs($fragment) |
||
94 | |||
95 | /** {@inheritdoc} */ |
||
96 | public function assertFragmentBeginsWith($fragment) |
||
102 | |||
103 | /** {@inheritdoc} */ |
||
104 | public function assertFragmentIsNot($fragment) |
||
110 | |||
111 | /** {@inheritdoc} */ |
||
112 | public function assertRouteIs($route, $parameters = []) |
||
118 | |||
119 | /** {@inheritdoc} */ |
||
120 | public function assertQueryStringHas($name, $value = null) |
||
126 | |||
127 | /** {@inheritdoc} */ |
||
128 | public function assertQueryStringMissing($name) |
||
134 | |||
135 | /** {@inheritdoc} */ |
||
136 | protected function assertHasQueryStringParameter($name) |
||
142 | } |
||
143 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: