guard-codeception 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +9 -4
- data/README.md +19 -9
- data/Rakefile +5 -0
- data/guard-codeception.gemspec +1 -1
- data/lib/guard/codeception.rb +10 -22
- data/lib/guard/codeception/runner.rb +44 -0
- data/lib/guard/codeception/version.rb +1 -1
- data/spec/fixtures/codeception/codeception.yml +18 -0
- data/spec/fixtures/codeception/composer.json +18 -0
- data/spec/fixtures/codeception/composer.lock +1545 -0
- data/spec/fixtures/codeception/index.php +1 -0
- data/spec/fixtures/codeception/tests/_bootstrap.php +2 -0
- data/spec/fixtures/codeception/tests/_data/dump.sql +1 -0
- data/spec/fixtures/codeception/tests/_helpers/CodeHelper.php +8 -0
- data/spec/fixtures/codeception/tests/_helpers/TestHelper.php +8 -0
- data/spec/fixtures/codeception/tests/_helpers/WebHelper.php +8 -0
- data/spec/fixtures/codeception/tests/_log/acceptance-2013-12-28 +19 -0
- data/spec/fixtures/codeception/tests/_log/indexCept.php.page.fail.html +1 -0
- data/spec/fixtures/codeception/tests/acceptance.suite.yml +18 -0
- data/spec/fixtures/codeception/tests/acceptance/WebGuy.php +2061 -0
- data/spec/fixtures/codeception/tests/acceptance/_bootstrap.php +2 -0
- data/spec/fixtures/codeception/tests/acceptance/indexCept.php +5 -0
- data/spec/fixtures/codeception/tests/functional.suite.yml +11 -0
- data/spec/fixtures/codeception/tests/functional/TestGuy.php +460 -0
- data/spec/fixtures/codeception/tests/functional/_bootstrap.php +2 -0
- data/spec/fixtures/codeception/tests/unit.suite.yml +8 -0
- data/spec/fixtures/codeception/tests/unit/CodeGuy.php +47 -0
- data/spec/fixtures/codeception/tests/unit/_bootstrap.php +2 -0
- data/spec/fixtures/results/codeception_failure +29 -0
- data/spec/fixtures/results/codeception_success +17 -0
- data/spec/guard/codeception/runner_spec.rb +59 -0
- data/spec/guard/codeception_spec.rb +32 -14
- metadata +66 -17
@@ -0,0 +1 @@
|
|
1
|
+
<h1>Hello World</h1>
|
@@ -0,0 +1 @@
|
|
1
|
+
/* Replace this file with actual dump of your database */
|
@@ -0,0 +1,19 @@
|
|
1
|
+
[2013-12-28 14:57:59] indexCept.php.INFO: am on page "/" [] []
|
2
|
+
[2013-12-28 14:57:59] indexCept.php.INFO: see "Hello World","h1" [] []
|
3
|
+
[2013-12-28 14:57:59] indexCept.php.INFO: PASSED [] []
|
4
|
+
[2013-12-28 15:16:08] indexCept.php.INFO: am on page "/" [] []
|
5
|
+
[2013-12-28 15:16:08] indexCept.php.INFO: see "Hello Worl","h1" [] []
|
6
|
+
[2013-12-28 15:16:08] indexCept.php.INFO: PASSED [] []
|
7
|
+
[2013-12-28 15:16:29] indexCept.php.INFO: am on page "/" [] []
|
8
|
+
[2013-12-28 15:16:29] indexCept.php.INFO: see "Hello Worl","h1" [] []
|
9
|
+
[2013-12-28 15:16:29] indexCept.php.INFO: PASSED [] []
|
10
|
+
[2013-12-28 15:17:05] indexCept.php.INFO: am on page "/" [] []
|
11
|
+
[2013-12-28 15:17:05] indexCept.php.INFO: see "Foo Bar","h2" [] []
|
12
|
+
[2013-12-28 15:17:05] indexCept.php.ALERT: CSS or XPath 'h2' was not found on page. [] []
|
13
|
+
[2013-12-28 15:17:05] indexCept.php.INFO: # FAILED # [] []
|
14
|
+
[2013-12-28 15:17:05] indexCept.php.INFO: PASSED [] []
|
15
|
+
[2013-12-28 19:55:53] indexCept.php.INFO: am on page "/" [] []
|
16
|
+
[2013-12-28 19:55:53] indexCept.php.INFO: see "Foo Bar","h2" [] []
|
17
|
+
[2013-12-28 19:55:53] indexCept.php.ALERT: CSS or XPath 'h2' was not found on page. [] []
|
18
|
+
[2013-12-28 19:55:53] indexCept.php.INFO: # FAILED # [] []
|
19
|
+
[2013-12-28 19:55:53] indexCept.php.INFO: PASSED [] []
|
@@ -0,0 +1 @@
|
|
1
|
+
<h1>Hello World</h1>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# Codeception Test Suite Configuration
|
2
|
+
|
3
|
+
# suite for acceptance tests.
|
4
|
+
# perform tests in browser using the Selenium-like tools.
|
5
|
+
# powered by Mink (http://mink.behat.org).
|
6
|
+
# (tip: that's what your customer will see).
|
7
|
+
# (tip: test your ajax and javascript by one of Mink drivers).
|
8
|
+
|
9
|
+
# RUN `build` COMMAND AFTER ADDING/REMOVING MODULES.
|
10
|
+
|
11
|
+
class_name: WebGuy
|
12
|
+
modules:
|
13
|
+
enabled:
|
14
|
+
- PhpBrowser
|
15
|
+
- WebHelper
|
16
|
+
config:
|
17
|
+
PhpBrowser:
|
18
|
+
url: 'http://localhost:8000'
|
@@ -0,0 +1,2061 @@
|
|
1
|
+
<?php
|
2
|
+
// This class was automatically generated by build task
|
3
|
+
// You should not change it manually as it will be overwritten on next build
|
4
|
+
// @codingStandardsIgnoreFile
|
5
|
+
|
6
|
+
|
7
|
+
use \Codeception\Maybe;
|
8
|
+
use Codeception\Module\PhpBrowser;
|
9
|
+
use Codeception\Module\WebHelper;
|
10
|
+
|
11
|
+
/**
|
12
|
+
* Inherited methods
|
13
|
+
* @method void execute($callable)
|
14
|
+
* @method void wantToTest($text)
|
15
|
+
* @method void wantTo($text)
|
16
|
+
* @method void expectTo($prediction)
|
17
|
+
* @method void expect($prediction)
|
18
|
+
* @method void amGoingTo($argumentation)
|
19
|
+
* @method void am($role)
|
20
|
+
* @method void lookForwardTo($achieveValue)
|
21
|
+
* @method void offsetGet($offset)
|
22
|
+
* @method void offsetSet($offset, $value)
|
23
|
+
* @method void offsetExists($offset)
|
24
|
+
* @method void offsetUnset($offset)
|
25
|
+
*/
|
26
|
+
|
27
|
+
class WebGuy extends \Codeception\AbstractGuy
|
28
|
+
{
|
29
|
+
|
30
|
+
/**
|
31
|
+
* This method is generated.
|
32
|
+
* Documentation taken from corresponding module.
|
33
|
+
* ----------------------------------------------
|
34
|
+
*
|
35
|
+
* Submits a form located on page.
|
36
|
+
* Specify the form by it's css or xpath selector.
|
37
|
+
* Fill the form fields values as array.
|
38
|
+
*
|
39
|
+
* Skipped fields will be filled by their values from page.
|
40
|
+
* You don't need to click the 'Submit' button afterwards.
|
41
|
+
* This command itself triggers the request to form's action.
|
42
|
+
*
|
43
|
+
* Examples:
|
44
|
+
*
|
45
|
+
* ``` php
|
46
|
+
* <?php
|
47
|
+
* $I->submitForm('#login', array('login' => 'davert', 'password' => '123456'));
|
48
|
+
*
|
49
|
+
* ```
|
50
|
+
*
|
51
|
+
* For sample Sign Up form:
|
52
|
+
*
|
53
|
+
* ``` html
|
54
|
+
* <form action="/sign_up">
|
55
|
+
* Login: <input type="text" name="user[login]" /><br/>
|
56
|
+
* Password: <input type="password" name="user[password]" /><br/>
|
57
|
+
* Do you agree to out terms? <input type="checkbox" name="user[agree]" /><br/>
|
58
|
+
* Select pricing plan <select name="plan"><option value="1">Free</option><option value="2" selected="selected">Paid</option></select>
|
59
|
+
* <input type="submit" value="Submit" />
|
60
|
+
* </form>
|
61
|
+
* ```
|
62
|
+
* I can write this:
|
63
|
+
*
|
64
|
+
* ``` php
|
65
|
+
* <?php
|
66
|
+
* $I->submitForm('#userForm', array('user' => array('login' => 'Davert', 'password' => '123456', 'agree' => true)));
|
67
|
+
*
|
68
|
+
* ```
|
69
|
+
* Note, that pricing plan will be set to Paid, as it's selected on page.
|
70
|
+
*
|
71
|
+
* @param $selector
|
72
|
+
* @param $params
|
73
|
+
* @see Codeception\Module\PhpBrowser::submitForm()
|
74
|
+
* @return \Codeception\Maybe
|
75
|
+
*/
|
76
|
+
public function submitForm($selector, $params) {
|
77
|
+
$this->scenario->addStep(new \Codeception\Step\Action('submitForm', func_get_args()));
|
78
|
+
if ($this->scenario->running()) {
|
79
|
+
$result = $this->scenario->runStep();
|
80
|
+
return new Maybe($result);
|
81
|
+
}
|
82
|
+
return new Maybe();
|
83
|
+
}
|
84
|
+
|
85
|
+
|
86
|
+
/**
|
87
|
+
* This method is generated.
|
88
|
+
* Documentation taken from corresponding module.
|
89
|
+
* ----------------------------------------------
|
90
|
+
*
|
91
|
+
* If your page triggers an ajax request, you can perform it manually.
|
92
|
+
* This action sends a POST ajax request with specified params.
|
93
|
+
* Additional params can be passed as array.
|
94
|
+
*
|
95
|
+
* Example:
|
96
|
+
*
|
97
|
+
* Imagine that by clicking checkbox you trigger ajax request which updates user settings.
|
98
|
+
* We emulate that click by running this ajax request manually.
|
99
|
+
*
|
100
|
+
* ``` php
|
101
|
+
* <?php
|
102
|
+
* $I->sendAjaxPostRequest('/updateSettings', array('notifications' => true)); // POST
|
103
|
+
* $I->sendAjaxGetRequest('/updateSettings', array('notifications' => true)); // GET
|
104
|
+
*
|
105
|
+
* ```
|
106
|
+
*
|
107
|
+
* @param $uri
|
108
|
+
* @param $params
|
109
|
+
* @see Codeception\Module\PhpBrowser::sendAjaxPostRequest()
|
110
|
+
* @return \Codeception\Maybe
|
111
|
+
*/
|
112
|
+
public function sendAjaxPostRequest($uri, $params = null) {
|
113
|
+
$this->scenario->addStep(new \Codeception\Step\Action('sendAjaxPostRequest', func_get_args()));
|
114
|
+
if ($this->scenario->running()) {
|
115
|
+
$result = $this->scenario->runStep();
|
116
|
+
return new Maybe($result);
|
117
|
+
}
|
118
|
+
return new Maybe();
|
119
|
+
}
|
120
|
+
|
121
|
+
|
122
|
+
/**
|
123
|
+
* This method is generated.
|
124
|
+
* Documentation taken from corresponding module.
|
125
|
+
* ----------------------------------------------
|
126
|
+
*
|
127
|
+
* If your page triggers an ajax request, you can perform it manually.
|
128
|
+
* This action sends a GET ajax request with specified params.
|
129
|
+
*
|
130
|
+
* See ->sendAjaxPostRequest for examples.
|
131
|
+
*
|
132
|
+
* @param $uri
|
133
|
+
* @param $params
|
134
|
+
* @see Codeception\Module\PhpBrowser::sendAjaxGetRequest()
|
135
|
+
* @return \Codeception\Maybe
|
136
|
+
*/
|
137
|
+
public function sendAjaxGetRequest($uri, $params = null) {
|
138
|
+
$this->scenario->addStep(new \Codeception\Step\Action('sendAjaxGetRequest', func_get_args()));
|
139
|
+
if ($this->scenario->running()) {
|
140
|
+
$result = $this->scenario->runStep();
|
141
|
+
return new Maybe($result);
|
142
|
+
}
|
143
|
+
return new Maybe();
|
144
|
+
}
|
145
|
+
|
146
|
+
|
147
|
+
/**
|
148
|
+
* This method is generated.
|
149
|
+
* Documentation taken from corresponding module.
|
150
|
+
* ----------------------------------------------
|
151
|
+
*
|
152
|
+
* If your page triggers an ajax request, you can perform it manually.
|
153
|
+
* This action sends an ajax request with specified method and params.
|
154
|
+
*
|
155
|
+
* Example:
|
156
|
+
*
|
157
|
+
* You need to perform an ajax request specifying the HTTP method.
|
158
|
+
*
|
159
|
+
* ``` php
|
160
|
+
* <?php
|
161
|
+
* $I->sendAjaxRequest('PUT', /posts/7', array('title' => 'new title');
|
162
|
+
*
|
163
|
+
* ```
|
164
|
+
*
|
165
|
+
* @param $method
|
166
|
+
* @param $uri
|
167
|
+
* @param $params
|
168
|
+
* @see Codeception\Module\PhpBrowser::sendAjaxRequest()
|
169
|
+
* @return \Codeception\Maybe
|
170
|
+
*/
|
171
|
+
public function sendAjaxRequest($method, $uri, $params = null) {
|
172
|
+
$this->scenario->addStep(new \Codeception\Step\Action('sendAjaxRequest', func_get_args()));
|
173
|
+
if ($this->scenario->running()) {
|
174
|
+
$result = $this->scenario->runStep();
|
175
|
+
return new Maybe($result);
|
176
|
+
}
|
177
|
+
return new Maybe();
|
178
|
+
}
|
179
|
+
|
180
|
+
|
181
|
+
/**
|
182
|
+
* This method is generated.
|
183
|
+
* Documentation taken from corresponding module.
|
184
|
+
* ----------------------------------------------
|
185
|
+
*
|
186
|
+
* Asserts that current page has 404 response status code.
|
187
|
+
* Conditional Assertion: Test won't be stopped on fail
|
188
|
+
* @see Codeception\Module\PhpBrowser::seePageNotFound()
|
189
|
+
* @return \Codeception\Maybe
|
190
|
+
*/
|
191
|
+
public function canSeePageNotFound() {
|
192
|
+
$this->scenario->addStep(new \Codeception\Step\ConditionalAssertion('seePageNotFound', func_get_args()));
|
193
|
+
if ($this->scenario->running()) {
|
194
|
+
$result = $this->scenario->runStep();
|
195
|
+
return new Maybe($result);
|
196
|
+
}
|
197
|
+
return new Maybe();
|
198
|
+
}
|
199
|
+
/**
|
200
|
+
* This method is generated.
|
201
|
+
* Documentation taken from corresponding module.
|
202
|
+
* ----------------------------------------------
|
203
|
+
*
|
204
|
+
* Asserts that current page has 404 response status code.
|
205
|
+
* @see Codeception\Module\PhpBrowser::seePageNotFound()
|
206
|
+
* @return \Codeception\Maybe
|
207
|
+
*/
|
208
|
+
public function seePageNotFound() {
|
209
|
+
$this->scenario->addStep(new \Codeception\Step\Assertion('seePageNotFound', func_get_args()));
|
210
|
+
if ($this->scenario->running()) {
|
211
|
+
$result = $this->scenario->runStep();
|
212
|
+
return new Maybe($result);
|
213
|
+
}
|
214
|
+
return new Maybe();
|
215
|
+
}
|
216
|
+
|
217
|
+
|
218
|
+
/**
|
219
|
+
* This method is generated.
|
220
|
+
* Documentation taken from corresponding module.
|
221
|
+
* ----------------------------------------------
|
222
|
+
*
|
223
|
+
* Checks that response code is equal to value provided.
|
224
|
+
*
|
225
|
+
* @param $code
|
226
|
+
* @return mixed
|
227
|
+
* Conditional Assertion: Test won't be stopped on fail
|
228
|
+
* @see Codeception\Module\PhpBrowser::seeResponseCodeIs()
|
229
|
+
* @return \Codeception\Maybe
|
230
|
+
*/
|
231
|
+
public function canSeeResponseCodeIs($code) {
|
232
|
+
$this->scenario->addStep(new \Codeception\Step\ConditionalAssertion('seeResponseCodeIs', func_get_args()));
|
233
|
+
if ($this->scenario->running()) {
|
234
|
+
$result = $this->scenario->runStep();
|
235
|
+
return new Maybe($result);
|
236
|
+
}
|
237
|
+
return new Maybe();
|
238
|
+
}
|
239
|
+
/**
|
240
|
+
* This method is generated.
|
241
|
+
* Documentation taken from corresponding module.
|
242
|
+
* ----------------------------------------------
|
243
|
+
*
|
244
|
+
* Checks that response code is equal to value provided.
|
245
|
+
*
|
246
|
+
* @param $code
|
247
|
+
* @return mixed
|
248
|
+
* @see Codeception\Module\PhpBrowser::seeResponseCodeIs()
|
249
|
+
* @return \Codeception\Maybe
|
250
|
+
*/
|
251
|
+
public function seeResponseCodeIs($code) {
|
252
|
+
$this->scenario->addStep(new \Codeception\Step\Assertion('seeResponseCodeIs', func_get_args()));
|
253
|
+
if ($this->scenario->running()) {
|
254
|
+
$result = $this->scenario->runStep();
|
255
|
+
return new Maybe($result);
|
256
|
+
}
|
257
|
+
return new Maybe();
|
258
|
+
}
|
259
|
+
|
260
|
+
|
261
|
+
/**
|
262
|
+
* This method is generated.
|
263
|
+
* Documentation taken from corresponding module.
|
264
|
+
* ----------------------------------------------
|
265
|
+
*
|
266
|
+
* Adds HTTP authentication via username/password.
|
267
|
+
*
|
268
|
+
* @param $username
|
269
|
+
* @param $password
|
270
|
+
* @see Codeception\Module\PhpBrowser::amHttpAuthenticated()
|
271
|
+
* @return \Codeception\Maybe
|
272
|
+
*/
|
273
|
+
public function amHttpAuthenticated($username, $password) {
|
274
|
+
$this->scenario->addStep(new \Codeception\Step\Condition('amHttpAuthenticated', func_get_args()));
|
275
|
+
if ($this->scenario->running()) {
|
276
|
+
$result = $this->scenario->runStep();
|
277
|
+
return new Maybe($result);
|
278
|
+
}
|
279
|
+
return new Maybe();
|
280
|
+
}
|
281
|
+
|
282
|
+
|
283
|
+
/**
|
284
|
+
* This method is generated.
|
285
|
+
* Documentation taken from corresponding module.
|
286
|
+
* ----------------------------------------------
|
287
|
+
*
|
288
|
+
* Low-level API method.
|
289
|
+
* If Codeception commands are not enough, use [Guzzle HTTP Client](http://guzzlephp.org/) methods directly
|
290
|
+
*
|
291
|
+
* Example:
|
292
|
+
*
|
293
|
+
* ``` php
|
294
|
+
* <?php
|
295
|
+
* // from the official Guzzle manual
|
296
|
+
* $I->amGoingTo('Sign all requests with OAuth');
|
297
|
+
* $I->executeInGuzzle(function (\Guzzle\Http\Client $client) {
|
298
|
+
* $client->addSubscriber(new Guzzle\Plugin\Oauth\OauthPlugin(array(
|
299
|
+
* 'consumer_key' => '***',
|
300
|
+
* 'consumer_secret' => '***',
|
301
|
+
* 'token' => '***',
|
302
|
+
* 'token_secret' => '***'
|
303
|
+
* )));
|
304
|
+
* });
|
305
|
+
* ?>
|
306
|
+
* ```
|
307
|
+
*
|
308
|
+
* Not recommended this command too be used on regular basis.
|
309
|
+
* If Codeception lacks important Guzzle Client methods implement then and submit patches.
|
310
|
+
*
|
311
|
+
* @param callable $function
|
312
|
+
* @see Codeception\Module\PhpBrowser::executeInGuzzle()
|
313
|
+
* @return \Codeception\Maybe
|
314
|
+
*/
|
315
|
+
public function executeInGuzzle($function) {
|
316
|
+
$this->scenario->addStep(new \Codeception\Step\Action('executeInGuzzle', func_get_args()));
|
317
|
+
if ($this->scenario->running()) {
|
318
|
+
$result = $this->scenario->runStep();
|
319
|
+
return new Maybe($result);
|
320
|
+
}
|
321
|
+
return new Maybe();
|
322
|
+
}
|
323
|
+
|
324
|
+
|
325
|
+
/**
|
326
|
+
* This method is generated.
|
327
|
+
* Documentation taken from corresponding module.
|
328
|
+
* ----------------------------------------------
|
329
|
+
*
|
330
|
+
* Assert if the specified checkbox is checked.
|
331
|
+
* Use css selector or xpath to match.
|
332
|
+
*
|
333
|
+
* Example:
|
334
|
+
*
|
335
|
+
* ``` php
|
336
|
+
* <?php
|
337
|
+
* $I->seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms
|
338
|
+
* $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form.
|
339
|
+
* $I->seeCheckboxIsChecked('//form/input[@type=checkbox and @name=agree]');
|
340
|
+
* ?>
|
341
|
+
* ```
|
342
|
+
*
|
343
|
+
* @param $checkbox
|
344
|
+
* Conditional Assertion: Test won't be stopped on fail
|
345
|
+
* @see Codeception\Module\PhpBrowser::seeCheckboxIsChecked()
|
346
|
+
* @return \Codeception\Maybe
|
347
|
+
*/
|
348
|
+
public function canSeeCheckboxIsChecked($checkbox) {
|
349
|
+
$this->scenario->addStep(new \Codeception\Step\ConditionalAssertion('seeCheckboxIsChecked', func_get_args()));
|
350
|
+
if ($this->scenario->running()) {
|
351
|
+
$result = $this->scenario->runStep();
|
352
|
+
return new Maybe($result);
|
353
|
+
}
|
354
|
+
return new Maybe();
|
355
|
+
}
|
356
|
+
/**
|
357
|
+
* This method is generated.
|
358
|
+
* Documentation taken from corresponding module.
|
359
|
+
* ----------------------------------------------
|
360
|
+
*
|
361
|
+
* Assert if the specified checkbox is checked.
|
362
|
+
* Use css selector or xpath to match.
|
363
|
+
*
|
364
|
+
* Example:
|
365
|
+
*
|
366
|
+
* ``` php
|
367
|
+
* <?php
|
368
|
+
* $I->seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms
|
369
|
+
* $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form.
|
370
|
+
* $I->seeCheckboxIsChecked('//form/input[@type=checkbox and @name=agree]');
|
371
|
+
* ?>
|
372
|
+
* ```
|
373
|
+
*
|
374
|
+
* @param $checkbox
|
375
|
+
* @see Codeception\Module\PhpBrowser::seeCheckboxIsChecked()
|
376
|
+
* @return \Codeception\Maybe
|
377
|
+
*/
|
378
|
+
public function seeCheckboxIsChecked($checkbox) {
|
379
|
+
$this->scenario->addStep(new \Codeception\Step\Assertion('seeCheckboxIsChecked', func_get_args()));
|
380
|
+
if ($this->scenario->running()) {
|
381
|
+
$result = $this->scenario->runStep();
|
382
|
+
return new Maybe($result);
|
383
|
+
}
|
384
|
+
return new Maybe();
|
385
|
+
}
|
386
|
+
|
387
|
+
|
388
|
+
/**
|
389
|
+
* This method is generated.
|
390
|
+
* Documentation taken from corresponding module.
|
391
|
+
* ----------------------------------------------
|
392
|
+
*
|
393
|
+
* Assert if the specified checkbox is unchecked.
|
394
|
+
* Use css selector or xpath to match.
|
395
|
+
*
|
396
|
+
* Example:
|
397
|
+
*
|
398
|
+
* ``` php
|
399
|
+
* <?php
|
400
|
+
* $I->dontSeeCheckboxIsChecked('#agree'); // I suppose user didn't agree to terms
|
401
|
+
* $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user didn't check the first checkbox in form.
|
402
|
+
* ?>
|
403
|
+
* ```
|
404
|
+
*
|
405
|
+
* @param $checkbox
|
406
|
+
* Conditional Assertion: Test won't be stopped on fail
|
407
|
+
* @see Codeception\Module\PhpBrowser::dontSeeCheckboxIsChecked()
|
408
|
+
* @return \Codeception\Maybe
|
409
|
+
*/
|
410
|
+
public function cantSeeCheckboxIsChecked($checkbox) {
|
411
|
+
$this->scenario->addStep(new \Codeception\Step\ConditionalAssertion('dontSeeCheckboxIsChecked', func_get_args()));
|
412
|
+
if ($this->scenario->running()) {
|
413
|
+
$result = $this->scenario->runStep();
|
414
|
+
return new Maybe($result);
|
415
|
+
}
|
416
|
+
return new Maybe();
|
417
|
+
}
|
418
|
+
/**
|
419
|
+
* This method is generated.
|
420
|
+
* Documentation taken from corresponding module.
|
421
|
+
* ----------------------------------------------
|
422
|
+
*
|
423
|
+
* Assert if the specified checkbox is unchecked.
|
424
|
+
* Use css selector or xpath to match.
|
425
|
+
*
|
426
|
+
* Example:
|
427
|
+
*
|
428
|
+
* ``` php
|
429
|
+
* <?php
|
430
|
+
* $I->dontSeeCheckboxIsChecked('#agree'); // I suppose user didn't agree to terms
|
431
|
+
* $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user didn't check the first checkbox in form.
|
432
|
+
* ?>
|
433
|
+
* ```
|
434
|
+
*
|
435
|
+
* @param $checkbox
|
436
|
+
* @see Codeception\Module\PhpBrowser::dontSeeCheckboxIsChecked()
|
437
|
+
* @return \Codeception\Maybe
|
438
|
+
*/
|
439
|
+
public function dontSeeCheckboxIsChecked($checkbox) {
|
440
|
+
$this->scenario->addStep(new \Codeception\Step\Assertion('dontSeeCheckboxIsChecked', func_get_args()));
|
441
|
+
if ($this->scenario->running()) {
|
442
|
+
$result = $this->scenario->runStep();
|
443
|
+
return new Maybe($result);
|
444
|
+
}
|
445
|
+
return new Maybe();
|
446
|
+
}
|
447
|
+
|
448
|
+
|
449
|
+
/**
|
450
|
+
* This method is generated.
|
451
|
+
* Documentation taken from corresponding module.
|
452
|
+
* ----------------------------------------------
|
453
|
+
*
|
454
|
+
* Opens the page.
|
455
|
+
*
|
456
|
+
* @param $page
|
457
|
+
* @see Codeception\Util\Mink::amOnPage()
|
458
|
+
* @return \Codeception\Maybe
|
459
|
+
*/
|
460
|
+
public function amOnPage($page) {
|
461
|
+
$this->scenario->addStep(new \Codeception\Step\Condition('amOnPage', func_get_args()));
|
462
|
+
if ($this->scenario->running()) {
|
463
|
+
$result = $this->scenario->runStep();
|
464
|
+
return new Maybe($result);
|
465
|
+
}
|
466
|
+
return new Maybe();
|
467
|
+
}
|
468
|
+
|
469
|
+
|
470
|
+
/**
|
471
|
+
* This method is generated.
|
472
|
+
* Documentation taken from corresponding module.
|
473
|
+
* ----------------------------------------------
|
474
|
+
*
|
475
|
+
* Sets 'url' configuration parameter to hosts subdomain.
|
476
|
+
* It does not open a page on subdomain. Use `amOnPage` for that
|
477
|
+
*
|
478
|
+
* ``` php
|
479
|
+
* <?php
|
480
|
+
* // If config is: 'http://mysite.com'
|
481
|
+
* // or config is: 'http://www.mysite.com'
|
482
|
+
* // or config is: 'http://company.mysite.com'
|
483
|
+
*
|
484
|
+
* $I->amOnSubdomain('user');
|
485
|
+
* $I->amOnPage('/');
|
486
|
+
* // moves to http://user.mysite.com/
|
487
|
+
* ?>
|
488
|
+
* ```
|
489
|
+
* @param $subdomain
|
490
|
+
* @return mixed
|
491
|
+
* @see Codeception\Util\Mink::amOnSubdomain()
|
492
|
+
* @return \Codeception\Maybe
|
493
|
+
*/
|
494
|
+
public function amOnSubdomain($subdomain) {
|
495
|
+
$this->scenario->addStep(new \Codeception\Step\Condition('amOnSubdomain', func_get_args()));
|
496
|
+
if ($this->scenario->running()) {
|
497
|
+
$result = $this->scenario->runStep();
|
498
|
+
return new Maybe($result);
|
499
|
+
}
|
500
|
+
return new Maybe();
|
501
|
+
}
|
502
|
+
|
503
|
+
|
504
|
+
/**
|
505
|
+
* This method is generated.
|
506
|
+
* Documentation taken from corresponding module.
|
507
|
+
* ----------------------------------------------
|
508
|
+
*
|
509
|
+
* @param string $text
|
510
|
+
* @param string $selector
|
511
|
+
*
|
512
|
+
* @return void
|
513
|
+
* Conditional Assertion: Test won't be stopped on fail
|
514
|
+
* @see Codeception\Util\Mink::dontSee()
|
515
|
+
* @return \Codeception\Maybe
|
516
|
+
*/
|
517
|
+
public function cantSee($text, $selector = null) {
|
518
|
+
$this->scenario->addStep(new \Codeception\Step\ConditionalAssertion('dontSee', func_get_args()));
|
519
|
+
if ($this->scenario->running()) {
|
520
|
+
$result = $this->scenario->runStep();
|
521
|
+
return new Maybe($result);
|
522
|
+
}
|
523
|
+
return new Maybe();
|
524
|
+
}
|
525
|
+
/**
|
526
|
+
* This method is generated.
|
527
|
+
* Documentation taken from corresponding module.
|
528
|
+
* ----------------------------------------------
|
529
|
+
*
|
530
|
+
* @param string $text
|
531
|
+
* @param string $selector
|
532
|
+
*
|
533
|
+
* @return void
|
534
|
+
* @see Codeception\Util\Mink::dontSee()
|
535
|
+
* @return \Codeception\Maybe
|
536
|
+
*/
|
537
|
+
public function dontSee($text, $selector = null) {
|
538
|
+
$this->scenario->addStep(new \Codeception\Step\Assertion('dontSee', func_get_args()));
|
539
|
+
if ($this->scenario->running()) {
|
540
|
+
$result = $this->scenario->runStep();
|
541
|
+
return new Maybe($result);
|
542
|
+
}
|
543
|
+
return new Maybe();
|
544
|
+
}
|
545
|
+
|
546
|
+
|
547
|
+
/**
|
548
|
+
* This method is generated.
|
549
|
+
* Documentation taken from corresponding module.
|
550
|
+
* ----------------------------------------------
|
551
|
+
*
|
552
|
+
* Check if current page contains the text specified.
|
553
|
+
* Specify the css selector to match only specific region.
|
554
|
+
*
|
555
|
+
* Examples:
|
556
|
+
*
|
557
|
+
* ``` php
|
558
|
+
* <?php
|
559
|
+
* $I->see('Logout'); // I can suppose user is logged in
|
560
|
+
* $I->see('Sign Up','h1'); // I can suppose it's a signup page
|
561
|
+
* $I->see('Sign Up','//body/h1'); // with XPath
|
562
|
+
* ?>
|
563
|
+
* ```
|
564
|
+
*
|
565
|
+
* @param $text
|
566
|
+
* @param null $selector
|
567
|
+
* Conditional Assertion: Test won't be stopped on fail
|
568
|
+
* @see Codeception\Util\Mink::see()
|
569
|
+
* @return \Codeception\Maybe
|
570
|
+
*/
|
571
|
+
public function canSee($text, $selector = null) {
|
572
|
+
$this->scenario->addStep(new \Codeception\Step\ConditionalAssertion('see', func_get_args()));
|
573
|
+
if ($this->scenario->running()) {
|
574
|
+
$result = $this->scenario->runStep();
|
575
|
+
return new Maybe($result);
|
576
|
+
}
|
577
|
+
return new Maybe();
|
578
|
+
}
|
579
|
+
/**
|
580
|
+
* This method is generated.
|
581
|
+
* Documentation taken from corresponding module.
|
582
|
+
* ----------------------------------------------
|
583
|
+
*
|
584
|
+
* Check if current page contains the text specified.
|
585
|
+
* Specify the css selector to match only specific region.
|
586
|
+
*
|
587
|
+
* Examples:
|
588
|
+
*
|
589
|
+
* ``` php
|
590
|
+
* <?php
|
591
|
+
* $I->see('Logout'); // I can suppose user is logged in
|
592
|
+
* $I->see('Sign Up','h1'); // I can suppose it's a signup page
|
593
|
+
* $I->see('Sign Up','//body/h1'); // with XPath
|
594
|
+
* ?>
|
595
|
+
* ```
|
596
|
+
*
|
597
|
+
* @param $text
|
598
|
+
* @param null $selector
|
599
|
+
* @see Codeception\Util\Mink::see()
|
600
|
+
* @return \Codeception\Maybe
|
601
|
+
*/
|
602
|
+
public function see($text, $selector = null) {
|
603
|
+
$this->scenario->addStep(new \Codeception\Step\Assertion('see', func_get_args()));
|
604
|
+
if ($this->scenario->running()) {
|
605
|
+
$result = $this->scenario->runStep();
|
606
|
+
return new Maybe($result);
|
607
|
+
}
|
608
|
+
return new Maybe();
|
609
|
+
}
|
610
|
+
|
611
|
+
|
612
|
+
/**
|
613
|
+
* This method is generated.
|
614
|
+
* Documentation taken from corresponding module.
|
615
|
+
* ----------------------------------------------
|
616
|
+
*
|
617
|
+
* Checks if there is a link with text specified.
|
618
|
+
* Specify url to match link with exact this url.
|
619
|
+
*
|
620
|
+
* Examples:
|
621
|
+
*
|
622
|
+
* ``` php
|
623
|
+
* <?php
|
624
|
+
* $I->seeLink('Logout'); // matches <a href="#">Logout</a>
|
625
|
+
* $I->seeLink('Logout','/logout'); // matches <a href="/logout">Logout</a>
|
626
|
+
* ?>
|
627
|
+
* ```
|
628
|
+
*
|
629
|
+
* @param $text
|
630
|
+
* @param null $url
|
631
|
+
* Conditional Assertion: Test won't be stopped on fail
|
632
|
+
* @see Codeception\Util\Mink::seeLink()
|
633
|
+
* @return \Codeception\Maybe
|
634
|
+
*/
|
635
|
+
public function canSeeLink($text, $url = null) {
|
636
|
+
$this->scenario->addStep(new \Codeception\Step\ConditionalAssertion('seeLink', func_get_args()));
|
637
|
+
if ($this->scenario->running()) {
|
638
|
+
$result = $this->scenario->runStep();
|
639
|
+
return new Maybe($result);
|
640
|
+
}
|
641
|
+
return new Maybe();
|
642
|
+
}
|
643
|
+
/**
|
644
|
+
* This method is generated.
|
645
|
+
* Documentation taken from corresponding module.
|
646
|
+
* ----------------------------------------------
|
647
|
+
*
|
648
|
+
* Checks if there is a link with text specified.
|
649
|
+
* Specify url to match link with exact this url.
|
650
|
+
*
|
651
|
+
* Examples:
|
652
|
+
*
|
653
|
+
* ``` php
|
654
|
+
* <?php
|
655
|
+
* $I->seeLink('Logout'); // matches <a href="#">Logout</a>
|
656
|
+
* $I->seeLink('Logout','/logout'); // matches <a href="/logout">Logout</a>
|
657
|
+
* ?>
|
658
|
+
* ```
|
659
|
+
*
|
660
|
+
* @param $text
|
661
|
+
* @param null $url
|
662
|
+
* @see Codeception\Util\Mink::seeLink()
|
663
|
+
* @return \Codeception\Maybe
|
664
|
+
*/
|
665
|
+
public function seeLink($text, $url = null) {
|
666
|
+
$this->scenario->addStep(new \Codeception\Step\Assertion('seeLink', func_get_args()));
|
667
|
+
if ($this->scenario->running()) {
|
668
|
+
$result = $this->scenario->runStep();
|
669
|
+
return new Maybe($result);
|
670
|
+
}
|
671
|
+
return new Maybe();
|
672
|
+
}
|
673
|
+
|
674
|
+
|
675
|
+
/**
|
676
|
+
* This method is generated.
|
677
|
+
* Documentation taken from corresponding module.
|
678
|
+
* ----------------------------------------------
|
679
|
+
*
|
680
|
+
* Checks if page doesn't contain the link with text specified.
|
681
|
+
* Specify url to narrow the results.
|
682
|
+
*
|
683
|
+
* Examples:
|
684
|
+
*
|
685
|
+
* ``` php
|
686
|
+
* <?php
|
687
|
+
* $I->dontSeeLink('Logout'); // I suppose user is not logged in
|
688
|
+
* ?>
|
689
|
+
* ```
|
690
|
+
*
|
691
|
+
* @param $text
|
692
|
+
* @param null $url
|
693
|
+
* Conditional Assertion: Test won't be stopped on fail
|
694
|
+
* @see Codeception\Util\Mink::dontSeeLink()
|
695
|
+
* @return \Codeception\Maybe
|
696
|
+
*/
|
697
|
+
public function cantSeeLink($text, $url = null) {
|
698
|
+
$this->scenario->addStep(new \Codeception\Step\ConditionalAssertion('dontSeeLink', func_get_args()));
|
699
|
+
if ($this->scenario->running()) {
|
700
|
+
$result = $this->scenario->runStep();
|
701
|
+
return new Maybe($result);
|
702
|
+
}
|
703
|
+
return new Maybe();
|
704
|
+
}
|
705
|
+
/**
|
706
|
+
* This method is generated.
|
707
|
+
* Documentation taken from corresponding module.
|
708
|
+
* ----------------------------------------------
|
709
|
+
*
|
710
|
+
* Checks if page doesn't contain the link with text specified.
|
711
|
+
* Specify url to narrow the results.
|
712
|
+
*
|
713
|
+
* Examples:
|
714
|
+
*
|
715
|
+
* ``` php
|
716
|
+
* <?php
|
717
|
+
* $I->dontSeeLink('Logout'); // I suppose user is not logged in
|
718
|
+
* ?>
|
719
|
+
* ```
|
720
|
+
*
|
721
|
+
* @param $text
|
722
|
+
* @param null $url
|
723
|
+
* @see Codeception\Util\Mink::dontSeeLink()
|
724
|
+
* @return \Codeception\Maybe
|
725
|
+
*/
|
726
|
+
public function dontSeeLink($text, $url = null) {
|
727
|
+
$this->scenario->addStep(new \Codeception\Step\Assertion('dontSeeLink', func_get_args()));
|
728
|
+
if ($this->scenario->running()) {
|
729
|
+
$result = $this->scenario->runStep();
|
730
|
+
return new Maybe($result);
|
731
|
+
}
|
732
|
+
return new Maybe();
|
733
|
+
}
|
734
|
+
|
735
|
+
|
736
|
+
/**
|
737
|
+
* This method is generated.
|
738
|
+
* Documentation taken from corresponding module.
|
739
|
+
* ----------------------------------------------
|
740
|
+
*
|
741
|
+
* Perform a click on link or button.
|
742
|
+
* Link or button are found by their names or CSS selector.
|
743
|
+
* Submits a form if button is a submit type.
|
744
|
+
*
|
745
|
+
* If link is an image it's found by alt attribute value of image.
|
746
|
+
* If button is image button is found by it's value
|
747
|
+
* If link or button can't be found by name they are searched by CSS selector.
|
748
|
+
*
|
749
|
+
* The second parameter is a context: CSS or XPath locator to narrow the search.
|
750
|
+
*
|
751
|
+
* Examples:
|
752
|
+
*
|
753
|
+
* ``` php
|
754
|
+
* <?php
|
755
|
+
* // simple link
|
756
|
+
* $I->click('Logout');
|
757
|
+
* // button of form
|
758
|
+
* $I->click('Submit');
|
759
|
+
* // CSS button
|
760
|
+
* $I->click('#form input[type=submit]');
|
761
|
+
* // XPath
|
762
|
+
* $I->click('//form/*[@type=submit]')
|
763
|
+
* // link in context
|
764
|
+
* $I->click('Logout', '#nav');
|
765
|
+
* ?>
|
766
|
+
* ```
|
767
|
+
* @param $link
|
768
|
+
* @param $context
|
769
|
+
* @see Codeception\Util\Mink::click()
|
770
|
+
* @return \Codeception\Maybe
|
771
|
+
*/
|
772
|
+
public function click($link, $context = null) {
|
773
|
+
$this->scenario->addStep(new \Codeception\Step\Action('click', func_get_args()));
|
774
|
+
if ($this->scenario->running()) {
|
775
|
+
$result = $this->scenario->runStep();
|
776
|
+
return new Maybe($result);
|
777
|
+
}
|
778
|
+
return new Maybe();
|
779
|
+
}
|
780
|
+
|
781
|
+
|
782
|
+
/**
|
783
|
+
* This method is generated.
|
784
|
+
* Documentation taken from corresponding module.
|
785
|
+
* ----------------------------------------------
|
786
|
+
*
|
787
|
+
* Checks if element exists on a page, matching it by CSS or XPath
|
788
|
+
*
|
789
|
+
* ``` php
|
790
|
+
* <?php
|
791
|
+
* $I->seeElement('.error');
|
792
|
+
* $I->seeElement('//form/input[1]');
|
793
|
+
* ?>
|
794
|
+
* ```
|
795
|
+
* @param $selector
|
796
|
+
* Conditional Assertion: Test won't be stopped on fail
|
797
|
+
* @see Codeception\Util\Mink::seeElement()
|
798
|
+
* @return \Codeception\Maybe
|
799
|
+
*/
|
800
|
+
public function canSeeElement($selector) {
|
801
|
+
$this->scenario->addStep(new \Codeception\Step\ConditionalAssertion('seeElement', func_get_args()));
|
802
|
+
if ($this->scenario->running()) {
|
803
|
+
$result = $this->scenario->runStep();
|
804
|
+
return new Maybe($result);
|
805
|
+
}
|
806
|
+
return new Maybe();
|
807
|
+
}
|
808
|
+
/**
|
809
|
+
* This method is generated.
|
810
|
+
* Documentation taken from corresponding module.
|
811
|
+
* ----------------------------------------------
|
812
|
+
*
|
813
|
+
* Checks if element exists on a page, matching it by CSS or XPath
|
814
|
+
*
|
815
|
+
* ``` php
|
816
|
+
* <?php
|
817
|
+
* $I->seeElement('.error');
|
818
|
+
* $I->seeElement('//form/input[1]');
|
819
|
+
* ?>
|
820
|
+
* ```
|
821
|
+
* @param $selector
|
822
|
+
* @see Codeception\Util\Mink::seeElement()
|
823
|
+
* @return \Codeception\Maybe
|
824
|
+
*/
|
825
|
+
public function seeElement($selector) {
|
826
|
+
$this->scenario->addStep(new \Codeception\Step\Assertion('seeElement', func_get_args()));
|
827
|
+
if ($this->scenario->running()) {
|
828
|
+
$result = $this->scenario->runStep();
|
829
|
+
return new Maybe($result);
|
830
|
+
}
|
831
|
+
return new Maybe();
|
832
|
+
}
|
833
|
+
|
834
|
+
|
835
|
+
/**
|
836
|
+
* This method is generated.
|
837
|
+
* Documentation taken from corresponding module.
|
838
|
+
* ----------------------------------------------
|
839
|
+
*
|
840
|
+
* Checks if element does not exist (or is visible) on a page, matching it by CSS or XPath
|
841
|
+
*
|
842
|
+
* Example:
|
843
|
+
*
|
844
|
+
* ``` php
|
845
|
+
* <?php
|
846
|
+
* $I->dontSeeElement('.error');
|
847
|
+
* $I->dontSeeElement('//form/input[1]');
|
848
|
+
* ?>
|
849
|
+
* ```
|
850
|
+
* @param $selector
|
851
|
+
* Conditional Assertion: Test won't be stopped on fail
|
852
|
+
* @see Codeception\Util\Mink::dontSeeElement()
|
853
|
+
* @return \Codeception\Maybe
|
854
|
+
*/
|
855
|
+
public function cantSeeElement($selector) {
|
856
|
+
$this->scenario->addStep(new \Codeception\Step\ConditionalAssertion('dontSeeElement', func_get_args()));
|
857
|
+
if ($this->scenario->running()) {
|
858
|
+
$result = $this->scenario->runStep();
|
859
|
+
return new Maybe($result);
|
860
|
+
}
|
861
|
+
return new Maybe();
|
862
|
+
}
|
863
|
+
/**
|
864
|
+
* This method is generated.
|
865
|
+
* Documentation taken from corresponding module.
|
866
|
+
* ----------------------------------------------
|
867
|
+
*
|
868
|
+
* Checks if element does not exist (or is visible) on a page, matching it by CSS or XPath
|
869
|
+
*
|
870
|
+
* Example:
|
871
|
+
*
|
872
|
+
* ``` php
|
873
|
+
* <?php
|
874
|
+
* $I->dontSeeElement('.error');
|
875
|
+
* $I->dontSeeElement('//form/input[1]');
|
876
|
+
* ?>
|
877
|
+
* ```
|
878
|
+
* @param $selector
|
879
|
+
* @see Codeception\Util\Mink::dontSeeElement()
|
880
|
+
* @return \Codeception\Maybe
|
881
|
+
*/
|
882
|
+
public function dontSeeElement($selector) {
|
883
|
+
$this->scenario->addStep(new \Codeception\Step\Assertion('dontSeeElement', func_get_args()));
|
884
|
+
if ($this->scenario->running()) {
|
885
|
+
$result = $this->scenario->runStep();
|
886
|
+
return new Maybe($result);
|
887
|
+
}
|
888
|
+
return new Maybe();
|
889
|
+
}
|
890
|
+
|
891
|
+
|
892
|
+
/**
|
893
|
+
* This method is generated.
|
894
|
+
* Documentation taken from corresponding module.
|
895
|
+
* ----------------------------------------------
|
896
|
+
*
|
897
|
+
* Reloads current page
|
898
|
+
* @see Codeception\Util\Mink::reloadPage()
|
899
|
+
* @return \Codeception\Maybe
|
900
|
+
*/
|
901
|
+
public function reloadPage() {
|
902
|
+
$this->scenario->addStep(new \Codeception\Step\Action('reloadPage', func_get_args()));
|
903
|
+
if ($this->scenario->running()) {
|
904
|
+
$result = $this->scenario->runStep();
|
905
|
+
return new Maybe($result);
|
906
|
+
}
|
907
|
+
return new Maybe();
|
908
|
+
}
|
909
|
+
|
910
|
+
|
911
|
+
/**
|
912
|
+
* This method is generated.
|
913
|
+
* Documentation taken from corresponding module.
|
914
|
+
* ----------------------------------------------
|
915
|
+
*
|
916
|
+
* Moves back in history
|
917
|
+
* @see Codeception\Util\Mink::moveBack()
|
918
|
+
* @return \Codeception\Maybe
|
919
|
+
*/
|
920
|
+
public function moveBack() {
|
921
|
+
$this->scenario->addStep(new \Codeception\Step\Action('moveBack', func_get_args()));
|
922
|
+
if ($this->scenario->running()) {
|
923
|
+
$result = $this->scenario->runStep();
|
924
|
+
return new Maybe($result);
|
925
|
+
}
|
926
|
+
return new Maybe();
|
927
|
+
}
|
928
|
+
|
929
|
+
|
930
|
+
/**
|
931
|
+
* This method is generated.
|
932
|
+
* Documentation taken from corresponding module.
|
933
|
+
* ----------------------------------------------
|
934
|
+
*
|
935
|
+
* Moves forward in history
|
936
|
+
* @see Codeception\Util\Mink::moveForward()
|
937
|
+
* @return \Codeception\Maybe
|
938
|
+
*/
|
939
|
+
public function moveForward() {
|
940
|
+
$this->scenario->addStep(new \Codeception\Step\Action('moveForward', func_get_args()));
|
941
|
+
if ($this->scenario->running()) {
|
942
|
+
$result = $this->scenario->runStep();
|
943
|
+
return new Maybe($result);
|
944
|
+
}
|
945
|
+
return new Maybe();
|
946
|
+
}
|
947
|
+
|
948
|
+
|
949
|
+
/**
|
950
|
+
* This method is generated.
|
951
|
+
* Documentation taken from corresponding module.
|
952
|
+
* ----------------------------------------------
|
953
|
+
*
|
954
|
+
* Fills a text field or textarea with value.
|
955
|
+
*
|
956
|
+
* Example:
|
957
|
+
*
|
958
|
+
* ``` php
|
959
|
+
* <?php
|
960
|
+
* $I->fillField("//input[@type='text']", "Hello World!");
|
961
|
+
* ?>
|
962
|
+
* ```
|
963
|
+
*
|
964
|
+
* @param $field
|
965
|
+
* @param $value
|
966
|
+
* @see Codeception\Util\Mink::fillField()
|
967
|
+
* @return \Codeception\Maybe
|
968
|
+
*/
|
969
|
+
public function fillField($field, $value) {
|
970
|
+
$this->scenario->addStep(new \Codeception\Step\Action('fillField', func_get_args()));
|
971
|
+
if ($this->scenario->running()) {
|
972
|
+
$result = $this->scenario->runStep();
|
973
|
+
return new Maybe($result);
|
974
|
+
}
|
975
|
+
return new Maybe();
|
976
|
+
}
|
977
|
+
|
978
|
+
|
979
|
+
/**
|
980
|
+
* This method is generated.
|
981
|
+
* Documentation taken from corresponding module.
|
982
|
+
* ----------------------------------------------
|
983
|
+
*
|
984
|
+
* Selects an option in select tag or in radio button group.
|
985
|
+
*
|
986
|
+
* Example:
|
987
|
+
*
|
988
|
+
* ``` php
|
989
|
+
* <?php
|
990
|
+
* $I->selectOption('form select[name=account]', 'Premium');
|
991
|
+
* $I->selectOption('form input[name=payment]', 'Monthly');
|
992
|
+
* $I->selectOption('//form/select[@name=account]', 'Monthly');
|
993
|
+
* ?>
|
994
|
+
* ```
|
995
|
+
*
|
996
|
+
* Can select multiple options if second argument is array:
|
997
|
+
*
|
998
|
+
* ``` php
|
999
|
+
* <?php
|
1000
|
+
* $I->selectOption('Which OS do you use?', array('Windows','Linux'));
|
1001
|
+
* ?>
|
1002
|
+
* ```
|
1003
|
+
*
|
1004
|
+
* @param $select
|
1005
|
+
* @param $option
|
1006
|
+
* @see Codeception\Util\Mink::selectOption()
|
1007
|
+
* @return \Codeception\Maybe
|
1008
|
+
*/
|
1009
|
+
public function selectOption($select, $option) {
|
1010
|
+
$this->scenario->addStep(new \Codeception\Step\Action('selectOption', func_get_args()));
|
1011
|
+
if ($this->scenario->running()) {
|
1012
|
+
$result = $this->scenario->runStep();
|
1013
|
+
return new Maybe($result);
|
1014
|
+
}
|
1015
|
+
return new Maybe();
|
1016
|
+
}
|
1017
|
+
|
1018
|
+
|
1019
|
+
/**
|
1020
|
+
* This method is generated.
|
1021
|
+
* Documentation taken from corresponding module.
|
1022
|
+
* ----------------------------------------------
|
1023
|
+
*
|
1024
|
+
* Ticks a checkbox.
|
1025
|
+
* For radio buttons use `selectOption` method.
|
1026
|
+
*
|
1027
|
+
* Example:
|
1028
|
+
*
|
1029
|
+
* ``` php
|
1030
|
+
* <?php
|
1031
|
+
* $I->checkOption('#agree');
|
1032
|
+
* ?>
|
1033
|
+
* ```
|
1034
|
+
*
|
1035
|
+
* @param $option
|
1036
|
+
* @see Codeception\Util\Mink::checkOption()
|
1037
|
+
* @return \Codeception\Maybe
|
1038
|
+
*/
|
1039
|
+
public function checkOption($option) {
|
1040
|
+
$this->scenario->addStep(new \Codeception\Step\Action('checkOption', func_get_args()));
|
1041
|
+
if ($this->scenario->running()) {
|
1042
|
+
$result = $this->scenario->runStep();
|
1043
|
+
return new Maybe($result);
|
1044
|
+
}
|
1045
|
+
return new Maybe();
|
1046
|
+
}
|
1047
|
+
|
1048
|
+
|
1049
|
+
/**
|
1050
|
+
* This method is generated.
|
1051
|
+
* Documentation taken from corresponding module.
|
1052
|
+
* ----------------------------------------------
|
1053
|
+
*
|
1054
|
+
* Unticks a checkbox.
|
1055
|
+
*
|
1056
|
+
* Example:
|
1057
|
+
*
|
1058
|
+
* ``` php
|
1059
|
+
* <?php
|
1060
|
+
* $I->uncheckOption('#notify');
|
1061
|
+
* ?>
|
1062
|
+
* ```
|
1063
|
+
*
|
1064
|
+
* @param $option
|
1065
|
+
* @see Codeception\Util\Mink::uncheckOption()
|
1066
|
+
* @return \Codeception\Maybe
|
1067
|
+
*/
|
1068
|
+
public function uncheckOption($option) {
|
1069
|
+
$this->scenario->addStep(new \Codeception\Step\Action('uncheckOption', func_get_args()));
|
1070
|
+
if ($this->scenario->running()) {
|
1071
|
+
$result = $this->scenario->runStep();
|
1072
|
+
return new Maybe($result);
|
1073
|
+
}
|
1074
|
+
return new Maybe();
|
1075
|
+
}
|
1076
|
+
|
1077
|
+
|
1078
|
+
/**
|
1079
|
+
* This method is generated.
|
1080
|
+
* Documentation taken from corresponding module.
|
1081
|
+
* ----------------------------------------------
|
1082
|
+
*
|
1083
|
+
* Checks that current uri contains a value
|
1084
|
+
*
|
1085
|
+
* ``` php
|
1086
|
+
* <?php
|
1087
|
+
* // to match: /home/dashboard
|
1088
|
+
* $I->seeInCurrentUrl('home');
|
1089
|
+
* // to match: /users/1
|
1090
|
+
* $I->seeInCurrentUrl('/users/');
|
1091
|
+
* ?>
|
1092
|
+
* ```
|
1093
|
+
*
|
1094
|
+
* @param $uri
|
1095
|
+
* Conditional Assertion: Test won't be stopped on fail
|
1096
|
+
* @see Codeception\Util\Mink::seeInCurrentUrl()
|
1097
|
+
* @return \Codeception\Maybe
|
1098
|
+
*/
|
1099
|
+
public function canSeeInCurrentUrl($uri) {
|
1100
|
+
$this->scenario->addStep(new \Codeception\Step\ConditionalAssertion('seeInCurrentUrl', func_get_args()));
|
1101
|
+
if ($this->scenario->running()) {
|
1102
|
+
$result = $this->scenario->runStep();
|
1103
|
+
return new Maybe($result);
|
1104
|
+
}
|
1105
|
+
return new Maybe();
|
1106
|
+
}
|
1107
|
+
/**
|
1108
|
+
* This method is generated.
|
1109
|
+
* Documentation taken from corresponding module.
|
1110
|
+
* ----------------------------------------------
|
1111
|
+
*
|
1112
|
+
* Checks that current uri contains a value
|
1113
|
+
*
|
1114
|
+
* ``` php
|
1115
|
+
* <?php
|
1116
|
+
* // to match: /home/dashboard
|
1117
|
+
* $I->seeInCurrentUrl('home');
|
1118
|
+
* // to match: /users/1
|
1119
|
+
* $I->seeInCurrentUrl('/users/');
|
1120
|
+
* ?>
|
1121
|
+
* ```
|
1122
|
+
*
|
1123
|
+
* @param $uri
|
1124
|
+
* @see Codeception\Util\Mink::seeInCurrentUrl()
|
1125
|
+
* @return \Codeception\Maybe
|
1126
|
+
*/
|
1127
|
+
public function seeInCurrentUrl($uri) {
|
1128
|
+
$this->scenario->addStep(new \Codeception\Step\Assertion('seeInCurrentUrl', func_get_args()));
|
1129
|
+
if ($this->scenario->running()) {
|
1130
|
+
$result = $this->scenario->runStep();
|
1131
|
+
return new Maybe($result);
|
1132
|
+
}
|
1133
|
+
return new Maybe();
|
1134
|
+
}
|
1135
|
+
|
1136
|
+
|
1137
|
+
/**
|
1138
|
+
* This method is generated.
|
1139
|
+
* Documentation taken from corresponding module.
|
1140
|
+
* ----------------------------------------------
|
1141
|
+
*
|
1142
|
+
* Checks that current uri does not contain a value
|
1143
|
+
*
|
1144
|
+
* ``` php
|
1145
|
+
* <?php
|
1146
|
+
* $I->dontSeeInCurrentUrl('/users/');
|
1147
|
+
* ?>
|
1148
|
+
* ```
|
1149
|
+
*
|
1150
|
+
* @param $uri
|
1151
|
+
* Conditional Assertion: Test won't be stopped on fail
|
1152
|
+
* @see Codeception\Util\Mink::dontSeeInCurrentUrl()
|
1153
|
+
* @return \Codeception\Maybe
|
1154
|
+
*/
|
1155
|
+
public function cantSeeInCurrentUrl($uri) {
|
1156
|
+
$this->scenario->addStep(new \Codeception\Step\ConditionalAssertion('dontSeeInCurrentUrl', func_get_args()));
|
1157
|
+
if ($this->scenario->running()) {
|
1158
|
+
$result = $this->scenario->runStep();
|
1159
|
+
return new Maybe($result);
|
1160
|
+
}
|
1161
|
+
return new Maybe();
|
1162
|
+
}
|
1163
|
+
/**
|
1164
|
+
* This method is generated.
|
1165
|
+
* Documentation taken from corresponding module.
|
1166
|
+
* ----------------------------------------------
|
1167
|
+
*
|
1168
|
+
* Checks that current uri does not contain a value
|
1169
|
+
*
|
1170
|
+
* ``` php
|
1171
|
+
* <?php
|
1172
|
+
* $I->dontSeeInCurrentUrl('/users/');
|
1173
|
+
* ?>
|
1174
|
+
* ```
|
1175
|
+
*
|
1176
|
+
* @param $uri
|
1177
|
+
* @see Codeception\Util\Mink::dontSeeInCurrentUrl()
|
1178
|
+
* @return \Codeception\Maybe
|
1179
|
+
*/
|
1180
|
+
public function dontSeeInCurrentUrl($uri) {
|
1181
|
+
$this->scenario->addStep(new \Codeception\Step\Assertion('dontSeeInCurrentUrl', func_get_args()));
|
1182
|
+
if ($this->scenario->running()) {
|
1183
|
+
$result = $this->scenario->runStep();
|
1184
|
+
return new Maybe($result);
|
1185
|
+
}
|
1186
|
+
return new Maybe();
|
1187
|
+
}
|
1188
|
+
|
1189
|
+
|
1190
|
+
/**
|
1191
|
+
* This method is generated.
|
1192
|
+
* Documentation taken from corresponding module.
|
1193
|
+
* ----------------------------------------------
|
1194
|
+
*
|
1195
|
+
* Checks that current url is equal to value.
|
1196
|
+
* Unlike `seeInCurrentUrl` performs a strict check.
|
1197
|
+
*
|
1198
|
+
* ``` php
|
1199
|
+
* <?php
|
1200
|
+
* // to match root url
|
1201
|
+
* $I->seeCurrentUrlEquals('/');
|
1202
|
+
* ?>
|
1203
|
+
* ```
|
1204
|
+
*
|
1205
|
+
* @param $uri
|
1206
|
+
* Conditional Assertion: Test won't be stopped on fail
|
1207
|
+
* @see Codeception\Util\Mink::seeCurrentUrlEquals()
|
1208
|
+
* @return \Codeception\Maybe
|
1209
|
+
*/
|
1210
|
+
public function canSeeCurrentUrlEquals($uri) {
|
1211
|
+
$this->scenario->addStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlEquals', func_get_args()));
|
1212
|
+
if ($this->scenario->running()) {
|
1213
|
+
$result = $this->scenario->runStep();
|
1214
|
+
return new Maybe($result);
|
1215
|
+
}
|
1216
|
+
return new Maybe();
|
1217
|
+
}
|
1218
|
+
/**
|
1219
|
+
* This method is generated.
|
1220
|
+
* Documentation taken from corresponding module.
|
1221
|
+
* ----------------------------------------------
|
1222
|
+
*
|
1223
|
+
* Checks that current url is equal to value.
|
1224
|
+
* Unlike `seeInCurrentUrl` performs a strict check.
|
1225
|
+
*
|
1226
|
+
* ``` php
|
1227
|
+
* <?php
|
1228
|
+
* // to match root url
|
1229
|
+
* $I->seeCurrentUrlEquals('/');
|
1230
|
+
* ?>
|
1231
|
+
* ```
|
1232
|
+
*
|
1233
|
+
* @param $uri
|
1234
|
+
* @see Codeception\Util\Mink::seeCurrentUrlEquals()
|
1235
|
+
* @return \Codeception\Maybe
|
1236
|
+
*/
|
1237
|
+
public function seeCurrentUrlEquals($uri) {
|
1238
|
+
$this->scenario->addStep(new \Codeception\Step\Assertion('seeCurrentUrlEquals', func_get_args()));
|
1239
|
+
if ($this->scenario->running()) {
|
1240
|
+
$result = $this->scenario->runStep();
|
1241
|
+
return new Maybe($result);
|
1242
|
+
}
|
1243
|
+
return new Maybe();
|
1244
|
+
}
|
1245
|
+
|
1246
|
+
|
1247
|
+
/**
|
1248
|
+
* This method is generated.
|
1249
|
+
* Documentation taken from corresponding module.
|
1250
|
+
* ----------------------------------------------
|
1251
|
+
*
|
1252
|
+
* Checks that current url is not equal to value.
|
1253
|
+
* Unlike `dontSeeInCurrentUrl` performs a strict check.
|
1254
|
+
*
|
1255
|
+
* ``` php
|
1256
|
+
* <?php
|
1257
|
+
* // current url is not root
|
1258
|
+
* $I->dontSeeCurrentUrlEquals('/');
|
1259
|
+
* ?>
|
1260
|
+
* ```
|
1261
|
+
*
|
1262
|
+
* @param $uri
|
1263
|
+
* Conditional Assertion: Test won't be stopped on fail
|
1264
|
+
* @see Codeception\Util\Mink::dontSeeCurrentUrlEquals()
|
1265
|
+
* @return \Codeception\Maybe
|
1266
|
+
*/
|
1267
|
+
public function cantSeeCurrentUrlEquals($uri) {
|
1268
|
+
$this->scenario->addStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlEquals', func_get_args()));
|
1269
|
+
if ($this->scenario->running()) {
|
1270
|
+
$result = $this->scenario->runStep();
|
1271
|
+
return new Maybe($result);
|
1272
|
+
}
|
1273
|
+
return new Maybe();
|
1274
|
+
}
|
1275
|
+
/**
|
1276
|
+
* This method is generated.
|
1277
|
+
* Documentation taken from corresponding module.
|
1278
|
+
* ----------------------------------------------
|
1279
|
+
*
|
1280
|
+
* Checks that current url is not equal to value.
|
1281
|
+
* Unlike `dontSeeInCurrentUrl` performs a strict check.
|
1282
|
+
*
|
1283
|
+
* ``` php
|
1284
|
+
* <?php
|
1285
|
+
* // current url is not root
|
1286
|
+
* $I->dontSeeCurrentUrlEquals('/');
|
1287
|
+
* ?>
|
1288
|
+
* ```
|
1289
|
+
*
|
1290
|
+
* @param $uri
|
1291
|
+
* @see Codeception\Util\Mink::dontSeeCurrentUrlEquals()
|
1292
|
+
* @return \Codeception\Maybe
|
1293
|
+
*/
|
1294
|
+
public function dontSeeCurrentUrlEquals($uri) {
|
1295
|
+
$this->scenario->addStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlEquals', func_get_args()));
|
1296
|
+
if ($this->scenario->running()) {
|
1297
|
+
$result = $this->scenario->runStep();
|
1298
|
+
return new Maybe($result);
|
1299
|
+
}
|
1300
|
+
return new Maybe();
|
1301
|
+
}
|
1302
|
+
|
1303
|
+
|
1304
|
+
/**
|
1305
|
+
* This method is generated.
|
1306
|
+
* Documentation taken from corresponding module.
|
1307
|
+
* ----------------------------------------------
|
1308
|
+
*
|
1309
|
+
* Checks that current url is matches a RegEx value
|
1310
|
+
*
|
1311
|
+
* ``` php
|
1312
|
+
* <?php
|
1313
|
+
* // to match root url
|
1314
|
+
* $I->seeCurrentUrlMatches('~$/users/(\d+)~');
|
1315
|
+
* ?>
|
1316
|
+
* ```
|
1317
|
+
*
|
1318
|
+
* @param $uri
|
1319
|
+
* Conditional Assertion: Test won't be stopped on fail
|
1320
|
+
* @see Codeception\Util\Mink::seeCurrentUrlMatches()
|
1321
|
+
* @return \Codeception\Maybe
|
1322
|
+
*/
|
1323
|
+
public function canSeeCurrentUrlMatches($uri) {
|
1324
|
+
$this->scenario->addStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlMatches', func_get_args()));
|
1325
|
+
if ($this->scenario->running()) {
|
1326
|
+
$result = $this->scenario->runStep();
|
1327
|
+
return new Maybe($result);
|
1328
|
+
}
|
1329
|
+
return new Maybe();
|
1330
|
+
}
|
1331
|
+
/**
|
1332
|
+
* This method is generated.
|
1333
|
+
* Documentation taken from corresponding module.
|
1334
|
+
* ----------------------------------------------
|
1335
|
+
*
|
1336
|
+
* Checks that current url is matches a RegEx value
|
1337
|
+
*
|
1338
|
+
* ``` php
|
1339
|
+
* <?php
|
1340
|
+
* // to match root url
|
1341
|
+
* $I->seeCurrentUrlMatches('~$/users/(\d+)~');
|
1342
|
+
* ?>
|
1343
|
+
* ```
|
1344
|
+
*
|
1345
|
+
* @param $uri
|
1346
|
+
* @see Codeception\Util\Mink::seeCurrentUrlMatches()
|
1347
|
+
* @return \Codeception\Maybe
|
1348
|
+
*/
|
1349
|
+
public function seeCurrentUrlMatches($uri) {
|
1350
|
+
$this->scenario->addStep(new \Codeception\Step\Assertion('seeCurrentUrlMatches', func_get_args()));
|
1351
|
+
if ($this->scenario->running()) {
|
1352
|
+
$result = $this->scenario->runStep();
|
1353
|
+
return new Maybe($result);
|
1354
|
+
}
|
1355
|
+
return new Maybe();
|
1356
|
+
}
|
1357
|
+
|
1358
|
+
|
1359
|
+
/**
|
1360
|
+
* This method is generated.
|
1361
|
+
* Documentation taken from corresponding module.
|
1362
|
+
* ----------------------------------------------
|
1363
|
+
*
|
1364
|
+
* Checks that current url does not match a RegEx value
|
1365
|
+
*
|
1366
|
+
* ``` php
|
1367
|
+
* <?php
|
1368
|
+
* // to match root url
|
1369
|
+
* $I->dontSeeCurrentUrlMatches('~$/users/(\d+)~');
|
1370
|
+
* ?>
|
1371
|
+
* ```
|
1372
|
+
*
|
1373
|
+
* @param $uri
|
1374
|
+
* Conditional Assertion: Test won't be stopped on fail
|
1375
|
+
* @see Codeception\Util\Mink::dontSeeCurrentUrlMatches()
|
1376
|
+
* @return \Codeception\Maybe
|
1377
|
+
*/
|
1378
|
+
public function cantSeeCurrentUrlMatches($uri) {
|
1379
|
+
$this->scenario->addStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlMatches', func_get_args()));
|
1380
|
+
if ($this->scenario->running()) {
|
1381
|
+
$result = $this->scenario->runStep();
|
1382
|
+
return new Maybe($result);
|
1383
|
+
}
|
1384
|
+
return new Maybe();
|
1385
|
+
}
|
1386
|
+
/**
|
1387
|
+
* This method is generated.
|
1388
|
+
* Documentation taken from corresponding module.
|
1389
|
+
* ----------------------------------------------
|
1390
|
+
*
|
1391
|
+
* Checks that current url does not match a RegEx value
|
1392
|
+
*
|
1393
|
+
* ``` php
|
1394
|
+
* <?php
|
1395
|
+
* // to match root url
|
1396
|
+
* $I->dontSeeCurrentUrlMatches('~$/users/(\d+)~');
|
1397
|
+
* ?>
|
1398
|
+
* ```
|
1399
|
+
*
|
1400
|
+
* @param $uri
|
1401
|
+
* @see Codeception\Util\Mink::dontSeeCurrentUrlMatches()
|
1402
|
+
* @return \Codeception\Maybe
|
1403
|
+
*/
|
1404
|
+
public function dontSeeCurrentUrlMatches($uri) {
|
1405
|
+
$this->scenario->addStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlMatches', func_get_args()));
|
1406
|
+
if ($this->scenario->running()) {
|
1407
|
+
$result = $this->scenario->runStep();
|
1408
|
+
return new Maybe($result);
|
1409
|
+
}
|
1410
|
+
return new Maybe();
|
1411
|
+
}
|
1412
|
+
|
1413
|
+
|
1414
|
+
/**
|
1415
|
+
* This method is generated.
|
1416
|
+
* Documentation taken from corresponding module.
|
1417
|
+
* ----------------------------------------------
|
1418
|
+
*
|
1419
|
+
* Checks that cookie is set.
|
1420
|
+
*
|
1421
|
+
* @param $cookie
|
1422
|
+
* @return mixed
|
1423
|
+
* Conditional Assertion: Test won't be stopped on fail
|
1424
|
+
* @see Codeception\Util\Mink::seeCookie()
|
1425
|
+
* @return \Codeception\Maybe
|
1426
|
+
*/
|
1427
|
+
public function canSeeCookie($cookie) {
|
1428
|
+
$this->scenario->addStep(new \Codeception\Step\ConditionalAssertion('seeCookie', func_get_args()));
|
1429
|
+
if ($this->scenario->running()) {
|
1430
|
+
$result = $this->scenario->runStep();
|
1431
|
+
return new Maybe($result);
|
1432
|
+
}
|
1433
|
+
return new Maybe();
|
1434
|
+
}
|
1435
|
+
/**
|
1436
|
+
* This method is generated.
|
1437
|
+
* Documentation taken from corresponding module.
|
1438
|
+
* ----------------------------------------------
|
1439
|
+
*
|
1440
|
+
* Checks that cookie is set.
|
1441
|
+
*
|
1442
|
+
* @param $cookie
|
1443
|
+
* @return mixed
|
1444
|
+
* @see Codeception\Util\Mink::seeCookie()
|
1445
|
+
* @return \Codeception\Maybe
|
1446
|
+
*/
|
1447
|
+
public function seeCookie($cookie) {
|
1448
|
+
$this->scenario->addStep(new \Codeception\Step\Assertion('seeCookie', func_get_args()));
|
1449
|
+
if ($this->scenario->running()) {
|
1450
|
+
$result = $this->scenario->runStep();
|
1451
|
+
return new Maybe($result);
|
1452
|
+
}
|
1453
|
+
return new Maybe();
|
1454
|
+
}
|
1455
|
+
|
1456
|
+
|
1457
|
+
/**
|
1458
|
+
* This method is generated.
|
1459
|
+
* Documentation taken from corresponding module.
|
1460
|
+
* ----------------------------------------------
|
1461
|
+
*
|
1462
|
+
* Checks that cookie doesn't exist
|
1463
|
+
*
|
1464
|
+
* @param $cookie
|
1465
|
+
* @return mixed
|
1466
|
+
* Conditional Assertion: Test won't be stopped on fail
|
1467
|
+
* @see Codeception\Util\Mink::dontSeeCookie()
|
1468
|
+
* @return \Codeception\Maybe
|
1469
|
+
*/
|
1470
|
+
public function cantSeeCookie($cookie) {
|
1471
|
+
$this->scenario->addStep(new \Codeception\Step\ConditionalAssertion('dontSeeCookie', func_get_args()));
|
1472
|
+
if ($this->scenario->running()) {
|
1473
|
+
$result = $this->scenario->runStep();
|
1474
|
+
return new Maybe($result);
|
1475
|
+
}
|
1476
|
+
return new Maybe();
|
1477
|
+
}
|
1478
|
+
/**
|
1479
|
+
* This method is generated.
|
1480
|
+
* Documentation taken from corresponding module.
|
1481
|
+
* ----------------------------------------------
|
1482
|
+
*
|
1483
|
+
* Checks that cookie doesn't exist
|
1484
|
+
*
|
1485
|
+
* @param $cookie
|
1486
|
+
* @return mixed
|
1487
|
+
* @see Codeception\Util\Mink::dontSeeCookie()
|
1488
|
+
* @return \Codeception\Maybe
|
1489
|
+
*/
|
1490
|
+
public function dontSeeCookie($cookie) {
|
1491
|
+
$this->scenario->addStep(new \Codeception\Step\Assertion('dontSeeCookie', func_get_args()));
|
1492
|
+
if ($this->scenario->running()) {
|
1493
|
+
$result = $this->scenario->runStep();
|
1494
|
+
return new Maybe($result);
|
1495
|
+
}
|
1496
|
+
return new Maybe();
|
1497
|
+
}
|
1498
|
+
|
1499
|
+
|
1500
|
+
/**
|
1501
|
+
* This method is generated.
|
1502
|
+
* Documentation taken from corresponding module.
|
1503
|
+
* ----------------------------------------------
|
1504
|
+
*
|
1505
|
+
* Sets a cookie.
|
1506
|
+
*
|
1507
|
+
* @param $cookie
|
1508
|
+
* @param $value
|
1509
|
+
* @return mixed
|
1510
|
+
* @see Codeception\Util\Mink::setCookie()
|
1511
|
+
* @return \Codeception\Maybe
|
1512
|
+
*/
|
1513
|
+
public function setCookie($cookie, $value) {
|
1514
|
+
$this->scenario->addStep(new \Codeception\Step\Action('setCookie', func_get_args()));
|
1515
|
+
if ($this->scenario->running()) {
|
1516
|
+
$result = $this->scenario->runStep();
|
1517
|
+
return new Maybe($result);
|
1518
|
+
}
|
1519
|
+
return new Maybe();
|
1520
|
+
}
|
1521
|
+
|
1522
|
+
|
1523
|
+
/**
|
1524
|
+
* This method is generated.
|
1525
|
+
* Documentation taken from corresponding module.
|
1526
|
+
* ----------------------------------------------
|
1527
|
+
*
|
1528
|
+
* Unsets cookie
|
1529
|
+
*
|
1530
|
+
* @param $cookie
|
1531
|
+
* @return mixed
|
1532
|
+
* @see Codeception\Util\Mink::resetCookie()
|
1533
|
+
* @return \Codeception\Maybe
|
1534
|
+
*/
|
1535
|
+
public function resetCookie($cookie) {
|
1536
|
+
$this->scenario->addStep(new \Codeception\Step\Action('resetCookie', func_get_args()));
|
1537
|
+
if ($this->scenario->running()) {
|
1538
|
+
$result = $this->scenario->runStep();
|
1539
|
+
return new Maybe($result);
|
1540
|
+
}
|
1541
|
+
return new Maybe();
|
1542
|
+
}
|
1543
|
+
|
1544
|
+
|
1545
|
+
/**
|
1546
|
+
* This method is generated.
|
1547
|
+
* Documentation taken from corresponding module.
|
1548
|
+
* ----------------------------------------------
|
1549
|
+
*
|
1550
|
+
* Grabs a cookie value.
|
1551
|
+
*
|
1552
|
+
* @param $cookie
|
1553
|
+
* @return mixed
|
1554
|
+
* @see Codeception\Util\Mink::grabCookie()
|
1555
|
+
* @return \Codeception\Maybe
|
1556
|
+
*/
|
1557
|
+
public function grabCookie($cookie) {
|
1558
|
+
$this->scenario->addStep(new \Codeception\Step\Action('grabCookie', func_get_args()));
|
1559
|
+
if ($this->scenario->running()) {
|
1560
|
+
$result = $this->scenario->runStep();
|
1561
|
+
return new Maybe($result);
|
1562
|
+
}
|
1563
|
+
return new Maybe();
|
1564
|
+
}
|
1565
|
+
|
1566
|
+
|
1567
|
+
/**
|
1568
|
+
* This method is generated.
|
1569
|
+
* Documentation taken from corresponding module.
|
1570
|
+
* ----------------------------------------------
|
1571
|
+
*
|
1572
|
+
* Takes a parameters from current URI by RegEx.
|
1573
|
+
* If no url provided returns full URI.
|
1574
|
+
*
|
1575
|
+
* ``` php
|
1576
|
+
* <?php
|
1577
|
+
* $user_id = $I->grabFromCurrentUrl('~$/user/(\d+)/~');
|
1578
|
+
* $uri = $I->grabFromCurrentUrl();
|
1579
|
+
* ?>
|
1580
|
+
* ```
|
1581
|
+
*
|
1582
|
+
* @param null $uri
|
1583
|
+
* @internal param $url
|
1584
|
+
* @return mixed
|
1585
|
+
* @see Codeception\Util\Mink::grabFromCurrentUrl()
|
1586
|
+
* @return \Codeception\Maybe
|
1587
|
+
*/
|
1588
|
+
public function grabFromCurrentUrl($uri = null) {
|
1589
|
+
$this->scenario->addStep(new \Codeception\Step\Action('grabFromCurrentUrl', func_get_args()));
|
1590
|
+
if ($this->scenario->running()) {
|
1591
|
+
$result = $this->scenario->runStep();
|
1592
|
+
return new Maybe($result);
|
1593
|
+
}
|
1594
|
+
return new Maybe();
|
1595
|
+
}
|
1596
|
+
|
1597
|
+
|
1598
|
+
/**
|
1599
|
+
* This method is generated.
|
1600
|
+
* Documentation taken from corresponding module.
|
1601
|
+
* ----------------------------------------------
|
1602
|
+
*
|
1603
|
+
* Attaches file from Codeception data directory to upload field.
|
1604
|
+
*
|
1605
|
+
* Example:
|
1606
|
+
*
|
1607
|
+
* ``` php
|
1608
|
+
* <?php
|
1609
|
+
* // file is stored in 'tests/_data/prices.xls'
|
1610
|
+
* $I->attachFile('input[@type="file"]', 'prices.xls');
|
1611
|
+
* ?>
|
1612
|
+
* ```
|
1613
|
+
*
|
1614
|
+
* @param $field
|
1615
|
+
* @param $filename
|
1616
|
+
* @see Codeception\Util\Mink::attachFile()
|
1617
|
+
* @return \Codeception\Maybe
|
1618
|
+
*/
|
1619
|
+
public function attachFile($field, $filename) {
|
1620
|
+
$this->scenario->addStep(new \Codeception\Step\Action('attachFile', func_get_args()));
|
1621
|
+
if ($this->scenario->running()) {
|
1622
|
+
$result = $this->scenario->runStep();
|
1623
|
+
return new Maybe($result);
|
1624
|
+
}
|
1625
|
+
return new Maybe();
|
1626
|
+
}
|
1627
|
+
|
1628
|
+
|
1629
|
+
/**
|
1630
|
+
* This method is generated.
|
1631
|
+
* Documentation taken from corresponding module.
|
1632
|
+
* ----------------------------------------------
|
1633
|
+
*
|
1634
|
+
* Checks if option is selected in select field.
|
1635
|
+
*
|
1636
|
+
* ``` php
|
1637
|
+
* <?php
|
1638
|
+
* $I->seeOptionIsSelected('#form input[name=payment]', 'Visa');
|
1639
|
+
* ?>
|
1640
|
+
* ```
|
1641
|
+
*
|
1642
|
+
* @param $selector
|
1643
|
+
* @param $optionText
|
1644
|
+
* @return mixed
|
1645
|
+
* Conditional Assertion: Test won't be stopped on fail
|
1646
|
+
* @see Codeception\Util\Mink::seeOptionIsSelected()
|
1647
|
+
* @return \Codeception\Maybe
|
1648
|
+
*/
|
1649
|
+
public function canSeeOptionIsSelected($select, $text) {
|
1650
|
+
$this->scenario->addStep(new \Codeception\Step\ConditionalAssertion('seeOptionIsSelected', func_get_args()));
|
1651
|
+
if ($this->scenario->running()) {
|
1652
|
+
$result = $this->scenario->runStep();
|
1653
|
+
return new Maybe($result);
|
1654
|
+
}
|
1655
|
+
return new Maybe();
|
1656
|
+
}
|
1657
|
+
/**
|
1658
|
+
* This method is generated.
|
1659
|
+
* Documentation taken from corresponding module.
|
1660
|
+
* ----------------------------------------------
|
1661
|
+
*
|
1662
|
+
* Checks if option is selected in select field.
|
1663
|
+
*
|
1664
|
+
* ``` php
|
1665
|
+
* <?php
|
1666
|
+
* $I->seeOptionIsSelected('#form input[name=payment]', 'Visa');
|
1667
|
+
* ?>
|
1668
|
+
* ```
|
1669
|
+
*
|
1670
|
+
* @param $selector
|
1671
|
+
* @param $optionText
|
1672
|
+
* @return mixed
|
1673
|
+
* @see Codeception\Util\Mink::seeOptionIsSelected()
|
1674
|
+
* @return \Codeception\Maybe
|
1675
|
+
*/
|
1676
|
+
public function seeOptionIsSelected($select, $text) {
|
1677
|
+
$this->scenario->addStep(new \Codeception\Step\Assertion('seeOptionIsSelected', func_get_args()));
|
1678
|
+
if ($this->scenario->running()) {
|
1679
|
+
$result = $this->scenario->runStep();
|
1680
|
+
return new Maybe($result);
|
1681
|
+
}
|
1682
|
+
return new Maybe();
|
1683
|
+
}
|
1684
|
+
|
1685
|
+
|
1686
|
+
/**
|
1687
|
+
* This method is generated.
|
1688
|
+
* Documentation taken from corresponding module.
|
1689
|
+
* ----------------------------------------------
|
1690
|
+
*
|
1691
|
+
* Checks if option is not selected in select field.
|
1692
|
+
*
|
1693
|
+
* ``` php
|
1694
|
+
* <?php
|
1695
|
+
* $I->dontSeeOptionIsSelected('#form input[name=payment]', 'Visa');
|
1696
|
+
* ?>
|
1697
|
+
* ```
|
1698
|
+
*
|
1699
|
+
* @param $selector
|
1700
|
+
* @param $optionText
|
1701
|
+
* @return mixed
|
1702
|
+
* Conditional Assertion: Test won't be stopped on fail
|
1703
|
+
* @see Codeception\Util\Mink::dontSeeOptionIsSelected()
|
1704
|
+
* @return \Codeception\Maybe
|
1705
|
+
*/
|
1706
|
+
public function cantSeeOptionIsSelected($select, $text) {
|
1707
|
+
$this->scenario->addStep(new \Codeception\Step\ConditionalAssertion('dontSeeOptionIsSelected', func_get_args()));
|
1708
|
+
if ($this->scenario->running()) {
|
1709
|
+
$result = $this->scenario->runStep();
|
1710
|
+
return new Maybe($result);
|
1711
|
+
}
|
1712
|
+
return new Maybe();
|
1713
|
+
}
|
1714
|
+
/**
|
1715
|
+
* This method is generated.
|
1716
|
+
* Documentation taken from corresponding module.
|
1717
|
+
* ----------------------------------------------
|
1718
|
+
*
|
1719
|
+
* Checks if option is not selected in select field.
|
1720
|
+
*
|
1721
|
+
* ``` php
|
1722
|
+
* <?php
|
1723
|
+
* $I->dontSeeOptionIsSelected('#form input[name=payment]', 'Visa');
|
1724
|
+
* ?>
|
1725
|
+
* ```
|
1726
|
+
*
|
1727
|
+
* @param $selector
|
1728
|
+
* @param $optionText
|
1729
|
+
* @return mixed
|
1730
|
+
* @see Codeception\Util\Mink::dontSeeOptionIsSelected()
|
1731
|
+
* @return \Codeception\Maybe
|
1732
|
+
*/
|
1733
|
+
public function dontSeeOptionIsSelected($select, $text) {
|
1734
|
+
$this->scenario->addStep(new \Codeception\Step\Assertion('dontSeeOptionIsSelected', func_get_args()));
|
1735
|
+
if ($this->scenario->running()) {
|
1736
|
+
$result = $this->scenario->runStep();
|
1737
|
+
return new Maybe($result);
|
1738
|
+
}
|
1739
|
+
return new Maybe();
|
1740
|
+
}
|
1741
|
+
|
1742
|
+
|
1743
|
+
/**
|
1744
|
+
* This method is generated.
|
1745
|
+
* Documentation taken from corresponding module.
|
1746
|
+
* ----------------------------------------------
|
1747
|
+
*
|
1748
|
+
* Checks that an input field or textarea contains value.
|
1749
|
+
* Field is matched either by label or CSS or Xpath
|
1750
|
+
*
|
1751
|
+
* Example:
|
1752
|
+
*
|
1753
|
+
* ``` php
|
1754
|
+
* <?php
|
1755
|
+
* $I->seeInField('Body','Type your comment here');
|
1756
|
+
* $I->seeInField('form textarea[name=body]','Type your comment here');
|
1757
|
+
* $I->seeInField('form input[type=hidden]','hidden_value');
|
1758
|
+
* $I->seeInField('#searchform input','Search');
|
1759
|
+
* $I->seeInField('//form/*[@name=search]','Search');
|
1760
|
+
* ?>
|
1761
|
+
* ```
|
1762
|
+
*
|
1763
|
+
* @param $field
|
1764
|
+
* @param $value
|
1765
|
+
* Conditional Assertion: Test won't be stopped on fail
|
1766
|
+
* @see Codeception\Util\Mink::seeInField()
|
1767
|
+
* @return \Codeception\Maybe
|
1768
|
+
*/
|
1769
|
+
public function canSeeInField($field, $value) {
|
1770
|
+
$this->scenario->addStep(new \Codeception\Step\ConditionalAssertion('seeInField', func_get_args()));
|
1771
|
+
if ($this->scenario->running()) {
|
1772
|
+
$result = $this->scenario->runStep();
|
1773
|
+
return new Maybe($result);
|
1774
|
+
}
|
1775
|
+
return new Maybe();
|
1776
|
+
}
|
1777
|
+
/**
|
1778
|
+
* This method is generated.
|
1779
|
+
* Documentation taken from corresponding module.
|
1780
|
+
* ----------------------------------------------
|
1781
|
+
*
|
1782
|
+
* Checks that an input field or textarea contains value.
|
1783
|
+
* Field is matched either by label or CSS or Xpath
|
1784
|
+
*
|
1785
|
+
* Example:
|
1786
|
+
*
|
1787
|
+
* ``` php
|
1788
|
+
* <?php
|
1789
|
+
* $I->seeInField('Body','Type your comment here');
|
1790
|
+
* $I->seeInField('form textarea[name=body]','Type your comment here');
|
1791
|
+
* $I->seeInField('form input[type=hidden]','hidden_value');
|
1792
|
+
* $I->seeInField('#searchform input','Search');
|
1793
|
+
* $I->seeInField('//form/*[@name=search]','Search');
|
1794
|
+
* ?>
|
1795
|
+
* ```
|
1796
|
+
*
|
1797
|
+
* @param $field
|
1798
|
+
* @param $value
|
1799
|
+
* @see Codeception\Util\Mink::seeInField()
|
1800
|
+
* @return \Codeception\Maybe
|
1801
|
+
*/
|
1802
|
+
public function seeInField($field, $value) {
|
1803
|
+
$this->scenario->addStep(new \Codeception\Step\Assertion('seeInField', func_get_args()));
|
1804
|
+
if ($this->scenario->running()) {
|
1805
|
+
$result = $this->scenario->runStep();
|
1806
|
+
return new Maybe($result);
|
1807
|
+
}
|
1808
|
+
return new Maybe();
|
1809
|
+
}
|
1810
|
+
|
1811
|
+
|
1812
|
+
/**
|
1813
|
+
* This method is generated.
|
1814
|
+
* Documentation taken from corresponding module.
|
1815
|
+
* ----------------------------------------------
|
1816
|
+
*
|
1817
|
+
* Checks that an input field or textarea doesn't contain value.
|
1818
|
+
* Field is matched either by label or CSS or Xpath
|
1819
|
+
* Example:
|
1820
|
+
*
|
1821
|
+
* ``` php
|
1822
|
+
* <?php
|
1823
|
+
* $I->dontSeeInField('Body','Type your comment here');
|
1824
|
+
* $I->dontSeeInField('form textarea[name=body]','Type your comment here');
|
1825
|
+
* $I->dontSeeInField('form input[type=hidden]','hidden_value');
|
1826
|
+
* $I->dontSeeInField('#searchform input','Search');
|
1827
|
+
* $I->dontSeeInField('//form/*[@name=search]','Search');
|
1828
|
+
* ?>
|
1829
|
+
* ```
|
1830
|
+
*
|
1831
|
+
* @param $field
|
1832
|
+
* @param $value
|
1833
|
+
* Conditional Assertion: Test won't be stopped on fail
|
1834
|
+
* @see Codeception\Util\Mink::dontSeeInField()
|
1835
|
+
* @return \Codeception\Maybe
|
1836
|
+
*/
|
1837
|
+
public function cantSeeInField($field, $value) {
|
1838
|
+
$this->scenario->addStep(new \Codeception\Step\ConditionalAssertion('dontSeeInField', func_get_args()));
|
1839
|
+
if ($this->scenario->running()) {
|
1840
|
+
$result = $this->scenario->runStep();
|
1841
|
+
return new Maybe($result);
|
1842
|
+
}
|
1843
|
+
return new Maybe();
|
1844
|
+
}
|
1845
|
+
/**
|
1846
|
+
* This method is generated.
|
1847
|
+
* Documentation taken from corresponding module.
|
1848
|
+
* ----------------------------------------------
|
1849
|
+
*
|
1850
|
+
* Checks that an input field or textarea doesn't contain value.
|
1851
|
+
* Field is matched either by label or CSS or Xpath
|
1852
|
+
* Example:
|
1853
|
+
*
|
1854
|
+
* ``` php
|
1855
|
+
* <?php
|
1856
|
+
* $I->dontSeeInField('Body','Type your comment here');
|
1857
|
+
* $I->dontSeeInField('form textarea[name=body]','Type your comment here');
|
1858
|
+
* $I->dontSeeInField('form input[type=hidden]','hidden_value');
|
1859
|
+
* $I->dontSeeInField('#searchform input','Search');
|
1860
|
+
* $I->dontSeeInField('//form/*[@name=search]','Search');
|
1861
|
+
* ?>
|
1862
|
+
* ```
|
1863
|
+
*
|
1864
|
+
* @param $field
|
1865
|
+
* @param $value
|
1866
|
+
* @see Codeception\Util\Mink::dontSeeInField()
|
1867
|
+
* @return \Codeception\Maybe
|
1868
|
+
*/
|
1869
|
+
public function dontSeeInField($field, $value) {
|
1870
|
+
$this->scenario->addStep(new \Codeception\Step\Assertion('dontSeeInField', func_get_args()));
|
1871
|
+
if ($this->scenario->running()) {
|
1872
|
+
$result = $this->scenario->runStep();
|
1873
|
+
return new Maybe($result);
|
1874
|
+
}
|
1875
|
+
return new Maybe();
|
1876
|
+
}
|
1877
|
+
|
1878
|
+
|
1879
|
+
/**
|
1880
|
+
* This method is generated.
|
1881
|
+
* Documentation taken from corresponding module.
|
1882
|
+
* ----------------------------------------------
|
1883
|
+
*
|
1884
|
+
* Finds and returns text contents of element.
|
1885
|
+
* Element is searched by CSS selector, XPath or matcher by regex.
|
1886
|
+
*
|
1887
|
+
* Example:
|
1888
|
+
*
|
1889
|
+
* ``` php
|
1890
|
+
* <?php
|
1891
|
+
* $heading = $I->grabTextFrom('h1');
|
1892
|
+
* $heading = $I->grabTextFrom('descendant-or-self::h1');
|
1893
|
+
* $value = $I->grabTextFrom('~<input value=(.*?)]~sgi');
|
1894
|
+
* ?>
|
1895
|
+
* ```
|
1896
|
+
*
|
1897
|
+
* @param $cssOrXPathOrRegex
|
1898
|
+
* @return mixed
|
1899
|
+
* @see Codeception\Util\Mink::grabTextFrom()
|
1900
|
+
* @return \Codeception\Maybe
|
1901
|
+
*/
|
1902
|
+
public function grabTextFrom($cssOrXPathOrRegex) {
|
1903
|
+
$this->scenario->addStep(new \Codeception\Step\Action('grabTextFrom', func_get_args()));
|
1904
|
+
if ($this->scenario->running()) {
|
1905
|
+
$result = $this->scenario->runStep();
|
1906
|
+
return new Maybe($result);
|
1907
|
+
}
|
1908
|
+
return new Maybe();
|
1909
|
+
}
|
1910
|
+
|
1911
|
+
|
1912
|
+
/**
|
1913
|
+
* This method is generated.
|
1914
|
+
* Documentation taken from corresponding module.
|
1915
|
+
* ----------------------------------------------
|
1916
|
+
*
|
1917
|
+
* Finds and returns field and returns it's value.
|
1918
|
+
* Searches by field name, then by CSS, then by XPath
|
1919
|
+
*
|
1920
|
+
* Example:
|
1921
|
+
*
|
1922
|
+
* ``` php
|
1923
|
+
* <?php
|
1924
|
+
* $name = $I->grabValueFrom('Name');
|
1925
|
+
* $name = $I->grabValueFrom('input[name=username]');
|
1926
|
+
* $name = $I->grabValueFrom('descendant-or-self::form/descendant::input[@name = 'username']');
|
1927
|
+
* ?>
|
1928
|
+
* ```
|
1929
|
+
*
|
1930
|
+
* @param $field
|
1931
|
+
* @return mixed
|
1932
|
+
* @see Codeception\Util\Mink::grabValueFrom()
|
1933
|
+
* @return \Codeception\Maybe
|
1934
|
+
*/
|
1935
|
+
public function grabValueFrom($field) {
|
1936
|
+
$this->scenario->addStep(new \Codeception\Step\Action('grabValueFrom', func_get_args()));
|
1937
|
+
if ($this->scenario->running()) {
|
1938
|
+
$result = $this->scenario->runStep();
|
1939
|
+
return new Maybe($result);
|
1940
|
+
}
|
1941
|
+
return new Maybe();
|
1942
|
+
}
|
1943
|
+
|
1944
|
+
|
1945
|
+
/**
|
1946
|
+
* This method is generated.
|
1947
|
+
* Documentation taken from corresponding module.
|
1948
|
+
* ----------------------------------------------
|
1949
|
+
*
|
1950
|
+
* Checks that page title contains text.
|
1951
|
+
*
|
1952
|
+
* ``` php
|
1953
|
+
* <?php
|
1954
|
+
* $I->seeInTitle('Blog - Post #1');
|
1955
|
+
* ?>
|
1956
|
+
* ```
|
1957
|
+
*
|
1958
|
+
* @param $title
|
1959
|
+
* @return mixed
|
1960
|
+
* Conditional Assertion: Test won't be stopped on fail
|
1961
|
+
* @see Codeception\Util\Mink::seeInTitle()
|
1962
|
+
* @return \Codeception\Maybe
|
1963
|
+
*/
|
1964
|
+
public function canSeeInTitle($title) {
|
1965
|
+
$this->scenario->addStep(new \Codeception\Step\ConditionalAssertion('seeInTitle', func_get_args()));
|
1966
|
+
if ($this->scenario->running()) {
|
1967
|
+
$result = $this->scenario->runStep();
|
1968
|
+
return new Maybe($result);
|
1969
|
+
}
|
1970
|
+
return new Maybe();
|
1971
|
+
}
|
1972
|
+
/**
|
1973
|
+
* This method is generated.
|
1974
|
+
* Documentation taken from corresponding module.
|
1975
|
+
* ----------------------------------------------
|
1976
|
+
*
|
1977
|
+
* Checks that page title contains text.
|
1978
|
+
*
|
1979
|
+
* ``` php
|
1980
|
+
* <?php
|
1981
|
+
* $I->seeInTitle('Blog - Post #1');
|
1982
|
+
* ?>
|
1983
|
+
* ```
|
1984
|
+
*
|
1985
|
+
* @param $title
|
1986
|
+
* @return mixed
|
1987
|
+
* @see Codeception\Util\Mink::seeInTitle()
|
1988
|
+
* @return \Codeception\Maybe
|
1989
|
+
*/
|
1990
|
+
public function seeInTitle($title) {
|
1991
|
+
$this->scenario->addStep(new \Codeception\Step\Assertion('seeInTitle', func_get_args()));
|
1992
|
+
if ($this->scenario->running()) {
|
1993
|
+
$result = $this->scenario->runStep();
|
1994
|
+
return new Maybe($result);
|
1995
|
+
}
|
1996
|
+
return new Maybe();
|
1997
|
+
}
|
1998
|
+
|
1999
|
+
|
2000
|
+
/**
|
2001
|
+
* This method is generated.
|
2002
|
+
* Documentation taken from corresponding module.
|
2003
|
+
* ----------------------------------------------
|
2004
|
+
*
|
2005
|
+
* Checks that page title does not contain text.
|
2006
|
+
*
|
2007
|
+
* @param $title
|
2008
|
+
* @return mixed
|
2009
|
+
* Conditional Assertion: Test won't be stopped on fail
|
2010
|
+
* @see Codeception\Util\Mink::dontSeeInTitle()
|
2011
|
+
* @return \Codeception\Maybe
|
2012
|
+
*/
|
2013
|
+
public function cantSeeInTitle($title) {
|
2014
|
+
$this->scenario->addStep(new \Codeception\Step\ConditionalAssertion('dontSeeInTitle', func_get_args()));
|
2015
|
+
if ($this->scenario->running()) {
|
2016
|
+
$result = $this->scenario->runStep();
|
2017
|
+
return new Maybe($result);
|
2018
|
+
}
|
2019
|
+
return new Maybe();
|
2020
|
+
}
|
2021
|
+
/**
|
2022
|
+
* This method is generated.
|
2023
|
+
* Documentation taken from corresponding module.
|
2024
|
+
* ----------------------------------------------
|
2025
|
+
*
|
2026
|
+
* Checks that page title does not contain text.
|
2027
|
+
*
|
2028
|
+
* @param $title
|
2029
|
+
* @return mixed
|
2030
|
+
* @see Codeception\Util\Mink::dontSeeInTitle()
|
2031
|
+
* @return \Codeception\Maybe
|
2032
|
+
*/
|
2033
|
+
public function dontSeeInTitle($title) {
|
2034
|
+
$this->scenario->addStep(new \Codeception\Step\Assertion('dontSeeInTitle', func_get_args()));
|
2035
|
+
if ($this->scenario->running()) {
|
2036
|
+
$result = $this->scenario->runStep();
|
2037
|
+
return new Maybe($result);
|
2038
|
+
}
|
2039
|
+
return new Maybe();
|
2040
|
+
}
|
2041
|
+
|
2042
|
+
|
2043
|
+
/**
|
2044
|
+
* This method is generated.
|
2045
|
+
* Documentation taken from corresponding module.
|
2046
|
+
* ----------------------------------------------
|
2047
|
+
*
|
2048
|
+
*
|
2049
|
+
* @see Codeception\Module::getName()
|
2050
|
+
* @return \Codeception\Maybe
|
2051
|
+
*/
|
2052
|
+
public function getName() {
|
2053
|
+
$this->scenario->addStep(new \Codeception\Step\Action('getName', func_get_args()));
|
2054
|
+
if ($this->scenario->running()) {
|
2055
|
+
$result = $this->scenario->runStep();
|
2056
|
+
return new Maybe($result);
|
2057
|
+
}
|
2058
|
+
return new Maybe();
|
2059
|
+
}
|
2060
|
+
}
|
2061
|
+
|