FunctionalTesterActions::grabAttributeFrom()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
nc 1
cc 1
eloc 2
nop 2
1
<?php  //[STAMP] 4a675831322f5ae06424cdcb31106b7e
2
namespace AppBundle\_generated;
3
4
// This class was automatically generated by build task
5
// You should not change it manually as it will be overwritten on next build
6
// @codingStandardsIgnoreFile
7
8
use Codeception\Module\Symfony;
9
use Codeception\Module\Doctrine2;
10
use AppBundle\Helper\FunctionalHelper;
11
use AppBundle\Helper\SecurityHelper;
12
13
trait FunctionalTesterActions
14
{
15
    /**
16
     * @return \Codeception\Scenario
17
     */
18
    abstract protected function getScenario();
19
20
    
21
    /**
22
     * [!] Method is generated. Documentation taken from corresponding module.
23
     *
24
     * Get service $serviceName and add it to the lists of persistent services.
25
     * If $isPermanent then service becomes persistent between tests
26
     *
27
     * @param string  $serviceName
28
     * @param boolean $isPermanent
29
     * @see \Codeception\Module\Symfony::persistService()
30
     */
31
    public function persistService($serviceName, $isPermanent = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $serviceName is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $isPermanent is not used and could be removed.

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

Loading history...
32
        return $this->getScenario()->runStep(new \Codeception\Step\Action('persistService', func_get_args()));
33
    }
34
35
 
36
    /**
37
     * [!] Method is generated. Documentation taken from corresponding module.
38
     *
39
     * Remove service $serviceName from the lists of persistent services.
40
     *
41
     * @param string $serviceName
42
     * @see \Codeception\Module\Symfony::unpersistService()
43
     */
44
    public function unpersistService($serviceName) {
0 ignored issues
show
Unused Code introduced by
The parameter $serviceName is not used and could be removed.

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

Loading history...
45
        return $this->getScenario()->runStep(new \Codeception\Step\Action('unpersistService', func_get_args()));
46
    }
47
48
 
49
    /**
50
     * [!] Method is generated. Documentation taken from corresponding module.
51
     *
52
     * Invalidate previously cached routes.
53
     * @see \Codeception\Module\Symfony::invalidateCachedRouter()
54
     */
55
    public function invalidateCachedRouter() {
56
        return $this->getScenario()->runStep(new \Codeception\Step\Action('invalidateCachedRouter', func_get_args()));
57
    }
58
59
 
60
    /**
61
     * [!] Method is generated. Documentation taken from corresponding module.
62
     *
63
     * Opens web page using route name and parameters.
64
     *
65
     * ``` php
66
     * <?php
67
     * $I->amOnRoute('posts.create');
68
     * $I->amOnRoute('posts.show', array('id' => 34));
69
     * ?>
70
     * ```
71
     *
72
     * @param $routeName
73
     * @param array $params
74
     * @see \Codeception\Module\Symfony::amOnRoute()
75
     */
76
    public function amOnRoute($routeName, $params = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $routeName is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

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

Loading history...
77
        return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnRoute', func_get_args()));
78
    }
79
80
 
81
    /**
82
     * [!] Method is generated. Documentation taken from corresponding module.
83
     *
84
     * Checks that current url matches route.
85
     *
86
     * ``` php
87
     * <?php
88
     * $I->seeCurrentRouteIs('posts.index');
89
     * $I->seeCurrentRouteIs('posts.show', array('id' => 8));
90
     * ?>
91
     * ```
92
     *
93
     * @param $routeName
94
     * @param array $params
95
     * Conditional Assertion: Test won't be stopped on fail
96
     * @see \Codeception\Module\Symfony::seeCurrentRouteIs()
97
     */
98
    public function canSeeCurrentRouteIs($routeName, $params = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $routeName is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

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

Loading history...
99
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentRouteIs', func_get_args()));
100
    }
101
    /**
102
     * [!] Method is generated. Documentation taken from corresponding module.
103
     *
104
     * Checks that current url matches route.
105
     *
106
     * ``` php
107
     * <?php
108
     * $I->seeCurrentRouteIs('posts.index');
109
     * $I->seeCurrentRouteIs('posts.show', array('id' => 8));
110
     * ?>
111
     * ```
112
     *
113
     * @param $routeName
114
     * @param array $params
115
     * @see \Codeception\Module\Symfony::seeCurrentRouteIs()
116
     */
117
    public function seeCurrentRouteIs($routeName, $params = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $routeName is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

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

Loading history...
118
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCurrentRouteIs', func_get_args()));
119
    }
120
121
 
122
    /**
123
     * [!] Method is generated. Documentation taken from corresponding module.
124
     *
125
     * Checks that current url matches route.
126
     * Unlike seeCurrentRouteIs, this can matches without exact route parameters
127
     *
128
     * ``` php
129
     * <?php
130
     * $I->seeCurrentRouteMatches('my_blog_pages');
131
     * ?>
132
     * ```
133
     *
134
     * @param $routeName
135
     * Conditional Assertion: Test won't be stopped on fail
136
     * @see \Codeception\Module\Symfony::seeInCurrentRoute()
137
     */
138
    public function canSeeInCurrentRoute($routeName) {
0 ignored issues
show
Unused Code introduced by
The parameter $routeName is not used and could be removed.

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

Loading history...
139
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInCurrentRoute', func_get_args()));
140
    }
141
    /**
142
     * [!] Method is generated. Documentation taken from corresponding module.
143
     *
144
     * Checks that current url matches route.
145
     * Unlike seeCurrentRouteIs, this can matches without exact route parameters
146
     *
147
     * ``` php
148
     * <?php
149
     * $I->seeCurrentRouteMatches('my_blog_pages');
150
     * ?>
151
     * ```
152
     *
153
     * @param $routeName
154
     * @see \Codeception\Module\Symfony::seeInCurrentRoute()
155
     */
156
    public function seeInCurrentRoute($routeName) {
0 ignored issues
show
Unused Code introduced by
The parameter $routeName is not used and could be removed.

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

Loading history...
157
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInCurrentRoute', func_get_args()));
158
    }
159
160
 
161
    /**
162
     * [!] Method is generated. Documentation taken from corresponding module.
163
     *
164
     * Checks if any email were sent by last request
165
     *
166
     * @throws \LogicException
167
     * Conditional Assertion: Test won't be stopped on fail
168
     * @see \Codeception\Module\Symfony::seeEmailIsSent()
169
     */
170
    public function canSeeEmailIsSent() {
171
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeEmailIsSent', func_get_args()));
172
    }
173
    /**
174
     * [!] Method is generated. Documentation taken from corresponding module.
175
     *
176
     * Checks if any email were sent by last request
177
     *
178
     * @throws \LogicException
179
     * @see \Codeception\Module\Symfony::seeEmailIsSent()
180
     */
181
    public function seeEmailIsSent() {
182
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeEmailIsSent', func_get_args()));
183
    }
184
185
 
186
    /**
187
     * [!] Method is generated. Documentation taken from corresponding module.
188
     *
189
     * Grabs a service from Symfony DIC container.
190
     * Recommended to use for unit testing.
191
     *
192
     * ``` php
193
     * <?php
194
     * $em = $I->grabServiceFromContainer('doctrine');
195
     * ?>
196
     * ```
197
     *
198
     * @param $service
199
     * @return mixed
200
     * @part services
201
     * @deprecated Use grabService instead
202
     * @see \Codeception\Module\Symfony::grabServiceFromContainer()
203
     */
204
    public function grabServiceFromContainer($service) {
0 ignored issues
show
Unused Code introduced by
The parameter $service is not used and could be removed.

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

Loading history...
205
        return $this->getScenario()->runStep(new \Codeception\Step\Action('grabServiceFromContainer', func_get_args()));
206
    }
207
208
 
209
    /**
210
     * [!] Method is generated. Documentation taken from corresponding module.
211
     *
212
     * Grabs a service from Symfony DIC container.
213
     * Recommended to use for unit testing.
214
     *
215
     * ``` php
216
     * <?php
217
     * $em = $I->grabService('doctrine');
218
     * ?>
219
     * ```
220
     *
221
     * @param $service
222
     * @return mixed
223
     * @part services
224
     * @see \Codeception\Module\Symfony::grabService()
225
     */
226
    public function grabService($service) {
0 ignored issues
show
Unused Code introduced by
The parameter $service is not used and could be removed.

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

Loading history...
227
        return $this->getScenario()->runStep(new \Codeception\Step\Action('grabService', func_get_args()));
228
    }
229
230
 
231
    /**
232
     * [!] Method is generated. Documentation taken from corresponding module.
233
     *
234
     * Reboot client's kernel.
235
     * Can be used to manually reboot kernel when 'rebootable_client' => false
236
     *
237
     * ``` php
238
     * <?php
239
     * ...
240
     * perform some requests
241
     * ...
242
     * $I->rebootClientKernel();
243
     * ...
244
     * perform other requests
245
     * ...
246
     *
247
     * ?>
248
     * ```
249
     *
250
     * @see \Codeception\Module\Symfony::rebootClientKernel()
251
     */
252
    public function rebootClientKernel() {
253
        return $this->getScenario()->runStep(new \Codeception\Step\Action('rebootClientKernel', func_get_args()));
254
    }
255
256
 
257
    /**
258
     * [!] Method is generated. Documentation taken from corresponding module.
259
     *
260
     * Authenticates user for HTTP_AUTH
261
     *
262
     * @param $username
263
     * @param $password
264
     * @see \Codeception\Lib\InnerBrowser::amHttpAuthenticated()
265
     */
266
    public function amHttpAuthenticated($username, $password) {
0 ignored issues
show
Unused Code introduced by
The parameter $username is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $password is not used and could be removed.

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

Loading history...
267
        return $this->getScenario()->runStep(new \Codeception\Step\Condition('amHttpAuthenticated', func_get_args()));
268
    }
269
270
 
271
    /**
272
     * [!] Method is generated. Documentation taken from corresponding module.
273
     *
274
     * Sets the HTTP header to the passed value - which is used on
275
     * subsequent HTTP requests through PhpBrowser.
276
     *
277
     * Example:
278
     * ```php
279
     * <?php
280
     * $I->setHeader('X-Requested-With', 'Codeception');
281
     * $I->amOnPage('test-headers.php');
282
     * ?>
283
     * ```
284
     *
285
     * @param string $name the name of the request header
286
     * @param string $value the value to set it to for subsequent
287
     *        requests
288
     * @see \Codeception\Lib\InnerBrowser::haveHttpHeader()
289
     */
290
    public function haveHttpHeader($name, $value) {
0 ignored issues
show
Unused Code introduced by
The parameter $name is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $value is not used and could be removed.

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

Loading history...
291
        return $this->getScenario()->runStep(new \Codeception\Step\Action('haveHttpHeader', func_get_args()));
292
    }
293
294
 
295
    /**
296
     * [!] Method is generated. Documentation taken from corresponding module.
297
     *
298
     * Deletes the header with the passed name.  Subsequent requests
299
     * will not have the deleted header in its request.
300
     *
301
     * Example:
302
     * ```php
303
     * <?php
304
     * $I->haveHttpHeader('X-Requested-With', 'Codeception');
305
     * $I->amOnPage('test-headers.php');
306
     * // ...
307
     * $I->deleteHeader('X-Requested-With');
308
     * $I->amOnPage('some-other-page.php');
309
     * ?>
310
     * ```
311
     *
312
     * @param string $name the name of the header to delete.
313
     * @see \Codeception\Lib\InnerBrowser::deleteHeader()
314
     */
315
    public function deleteHeader($name) {
0 ignored issues
show
Unused Code introduced by
The parameter $name is not used and could be removed.

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

Loading history...
316
        return $this->getScenario()->runStep(new \Codeception\Step\Action('deleteHeader', func_get_args()));
317
    }
318
319
 
320
    /**
321
     * [!] Method is generated. Documentation taken from corresponding module.
322
     *
323
     * Opens the page for the given relative URI.
324
     *
325
     * ``` php
326
     * <?php
327
     * // opens front page
328
     * $I->amOnPage('/');
329
     * // opens /register page
330
     * $I->amOnPage('/register');
331
     * ```
332
     *
333
     * @param $page
334
     * @see \Codeception\Lib\InnerBrowser::amOnPage()
335
     */
336
    public function amOnPage($page) {
0 ignored issues
show
Unused Code introduced by
The parameter $page is not used and could be removed.

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

Loading history...
337
        return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnPage', func_get_args()));
338
    }
339
340
 
341
    /**
342
     * [!] Method is generated. Documentation taken from corresponding module.
343
     *
344
     * Perform a click on a link or a button, given by a locator.
345
     * If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string.
346
     * For buttons, the "value" attribute, "name" attribute, and inner text are searched.
347
     * For links, the link text is searched.
348
     * For images, the "alt" attribute and inner text of any parent links are searched.
349
     *
350
     * The second parameter is a context (CSS or XPath locator) to narrow the search.
351
     *
352
     * Note that if the locator matches a button of type `submit`, the form will be submitted.
353
     *
354
     * ``` php
355
     * <?php
356
     * // simple link
357
     * $I->click('Logout');
358
     * // button of form
359
     * $I->click('Submit');
360
     * // CSS button
361
     * $I->click('#form input[type=submit]');
362
     * // XPath
363
     * $I->click('//form/*[@type=submit]');
364
     * // link in context
365
     * $I->click('Logout', '#nav');
366
     * // using strict locator
367
     * $I->click(['link' => 'Login']);
368
     * ?>
369
     * ```
370
     *
371
     * @param $link
372
     * @param $context
373
     * @see \Codeception\Lib\InnerBrowser::click()
374
     */
375
    public function click($link, $context = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $link is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $context is not used and could be removed.

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

Loading history...
376
        return $this->getScenario()->runStep(new \Codeception\Step\Action('click', func_get_args()));
377
    }
378
379
 
380
    /**
381
     * [!] Method is generated. Documentation taken from corresponding module.
382
     *
383
     * Checks that the current page contains the given string (case insensitive).
384
     *
385
     * You can specify a specific HTML element (via CSS or XPath) as the second
386
     * parameter to only search within that element.
387
     *
388
     * ``` php
389
     * <?php
390
     * $I->see('Logout');                        // I can suppose user is logged in
391
     * $I->see('Sign Up', 'h1');                 // I can suppose it's a signup page
392
     * $I->see('Sign Up', '//body/h1');          // with XPath
393
     * $I->see('Sign Up', ['css' => 'body h1']); // with strict CSS locator
394
     * ```
395
     *
396
     * Note that the search is done after stripping all HTML tags from the body,
397
     * so `$I->see('strong')` will return true for strings like:
398
     *
399
     *   - `<p>I am Stronger than thou</p>`
400
     *   - `<script>document.createElement('strong');</script>`
401
     *
402
     * But will *not* be true for strings like:
403
     *
404
     *   - `<strong>Home</strong>`
405
     *   - `<div class="strong">Home</strong>`
406
     *   - `<!-- strong -->`
407
     *
408
     * For checking the raw source code, use `seeInSource()`.
409
     *
410
     * @param      $text
411
     * @param null $selector
412
     * Conditional Assertion: Test won't be stopped on fail
413
     * @see \Codeception\Lib\InnerBrowser::see()
414
     */
415
    public function canSee($text, $selector = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $text is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $selector is not used and could be removed.

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

Loading history...
416
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('see', func_get_args()));
417
    }
418
    /**
419
     * [!] Method is generated. Documentation taken from corresponding module.
420
     *
421
     * Checks that the current page contains the given string (case insensitive).
422
     *
423
     * You can specify a specific HTML element (via CSS or XPath) as the second
424
     * parameter to only search within that element.
425
     *
426
     * ``` php
427
     * <?php
428
     * $I->see('Logout');                        // I can suppose user is logged in
429
     * $I->see('Sign Up', 'h1');                 // I can suppose it's a signup page
430
     * $I->see('Sign Up', '//body/h1');          // with XPath
431
     * $I->see('Sign Up', ['css' => 'body h1']); // with strict CSS locator
432
     * ```
433
     *
434
     * Note that the search is done after stripping all HTML tags from the body,
435
     * so `$I->see('strong')` will return true for strings like:
436
     *
437
     *   - `<p>I am Stronger than thou</p>`
438
     *   - `<script>document.createElement('strong');</script>`
439
     *
440
     * But will *not* be true for strings like:
441
     *
442
     *   - `<strong>Home</strong>`
443
     *   - `<div class="strong">Home</strong>`
444
     *   - `<!-- strong -->`
445
     *
446
     * For checking the raw source code, use `seeInSource()`.
447
     *
448
     * @param      $text
449
     * @param null $selector
450
     * @see \Codeception\Lib\InnerBrowser::see()
451
     */
452
    public function see($text, $selector = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $text is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $selector is not used and could be removed.

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

Loading history...
453
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('see', func_get_args()));
454
    }
455
456
 
457
    /**
458
     * [!] Method is generated. Documentation taken from corresponding module.
459
     *
460
     * Checks that the current page doesn't contain the text specified (case insensitive).
461
     * Give a locator as the second parameter to match a specific region.
462
     *
463
     * ```php
464
     * <?php
465
     * $I->dontSee('Login');                         // I can suppose user is already logged in
466
     * $I->dontSee('Sign Up','h1');                  // I can suppose it's not a signup page
467
     * $I->dontSee('Sign Up','//body/h1');           // with XPath
468
     * $I->dontSee('Sign Up', ['css' => 'body h1']); // with strict CSS locator
469
     * ```
470
     *
471
     * Note that the search is done after stripping all HTML tags from the body,
472
     * so `$I->dontSee('strong')` will fail on strings like:
473
     *
474
     *   - `<p>I am Stronger than thou</p>`
475
     *   - `<script>document.createElement('strong');</script>`
476
     *
477
     * But will ignore strings like:
478
     *
479
     *   - `<strong>Home</strong>`
480
     *   - `<div class="strong">Home</strong>`
481
     *   - `<!-- strong -->`
482
     *
483
     * For checking the raw source code, use `seeInSource()`.
484
     *
485
     * @param      $text
486
     * @param null $selector
487
     * Conditional Assertion: Test won't be stopped on fail
488
     * @see \Codeception\Lib\InnerBrowser::dontSee()
489
     */
490
    public function cantSee($text, $selector = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $text is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $selector is not used and could be removed.

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

Loading history...
491
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSee', func_get_args()));
492
    }
493
    /**
494
     * [!] Method is generated. Documentation taken from corresponding module.
495
     *
496
     * Checks that the current page doesn't contain the text specified (case insensitive).
497
     * Give a locator as the second parameter to match a specific region.
498
     *
499
     * ```php
500
     * <?php
501
     * $I->dontSee('Login');                         // I can suppose user is already logged in
502
     * $I->dontSee('Sign Up','h1');                  // I can suppose it's not a signup page
503
     * $I->dontSee('Sign Up','//body/h1');           // with XPath
504
     * $I->dontSee('Sign Up', ['css' => 'body h1']); // with strict CSS locator
505
     * ```
506
     *
507
     * Note that the search is done after stripping all HTML tags from the body,
508
     * so `$I->dontSee('strong')` will fail on strings like:
509
     *
510
     *   - `<p>I am Stronger than thou</p>`
511
     *   - `<script>document.createElement('strong');</script>`
512
     *
513
     * But will ignore strings like:
514
     *
515
     *   - `<strong>Home</strong>`
516
     *   - `<div class="strong">Home</strong>`
517
     *   - `<!-- strong -->`
518
     *
519
     * For checking the raw source code, use `seeInSource()`.
520
     *
521
     * @param      $text
522
     * @param null $selector
523
     * @see \Codeception\Lib\InnerBrowser::dontSee()
524
     */
525
    public function dontSee($text, $selector = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $text is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $selector is not used and could be removed.

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

Loading history...
526
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSee', func_get_args()));
527
    }
528
529
 
530
    /**
531
     * [!] Method is generated. Documentation taken from corresponding module.
532
     *
533
     * Checks that the current page contains the given string in its
534
     * raw source code.
535
     *
536
     * ``` php
537
     * <?php
538
     * $I->seeInSource('<h1>Green eggs &amp; ham</h1>');
539
     * ```
540
     *
541
     * @param      $raw
542
     * Conditional Assertion: Test won't be stopped on fail
543
     * @see \Codeception\Lib\InnerBrowser::seeInSource()
544
     */
545
    public function canSeeInSource($raw) {
0 ignored issues
show
Unused Code introduced by
The parameter $raw is not used and could be removed.

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

Loading history...
546
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInSource', func_get_args()));
547
    }
548
    /**
549
     * [!] Method is generated. Documentation taken from corresponding module.
550
     *
551
     * Checks that the current page contains the given string in its
552
     * raw source code.
553
     *
554
     * ``` php
555
     * <?php
556
     * $I->seeInSource('<h1>Green eggs &amp; ham</h1>');
557
     * ```
558
     *
559
     * @param      $raw
560
     * @see \Codeception\Lib\InnerBrowser::seeInSource()
561
     */
562
    public function seeInSource($raw) {
0 ignored issues
show
Unused Code introduced by
The parameter $raw is not used and could be removed.

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

Loading history...
563
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInSource', func_get_args()));
564
    }
565
566
 
567
    /**
568
     * [!] Method is generated. Documentation taken from corresponding module.
569
     *
570
     * Checks that the current page contains the given string in its
571
     * raw source code.
572
     *
573
     * ```php
574
     * <?php
575
     * $I->dontSeeInSource('<h1>Green eggs &amp; ham</h1>');
576
     * ```
577
     *
578
     * @param      $raw
579
     * Conditional Assertion: Test won't be stopped on fail
580
     * @see \Codeception\Lib\InnerBrowser::dontSeeInSource()
581
     */
582
    public function cantSeeInSource($raw) {
0 ignored issues
show
Unused Code introduced by
The parameter $raw is not used and could be removed.

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

Loading history...
583
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInSource', func_get_args()));
584
    }
585
    /**
586
     * [!] Method is generated. Documentation taken from corresponding module.
587
     *
588
     * Checks that the current page contains the given string in its
589
     * raw source code.
590
     *
591
     * ```php
592
     * <?php
593
     * $I->dontSeeInSource('<h1>Green eggs &amp; ham</h1>');
594
     * ```
595
     *
596
     * @param      $raw
597
     * @see \Codeception\Lib\InnerBrowser::dontSeeInSource()
598
     */
599
    public function dontSeeInSource($raw) {
0 ignored issues
show
Unused Code introduced by
The parameter $raw is not used and could be removed.

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

Loading history...
600
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInSource', func_get_args()));
601
    }
602
603
 
604
    /**
605
     * [!] Method is generated. Documentation taken from corresponding module.
606
     *
607
     * Checks that there's a link with the specified text.
608
     * Give a full URL as the second parameter to match links with that exact URL.
609
     *
610
     * ``` php
611
     * <?php
612
     * $I->seeLink('Logout'); // matches <a href="#">Logout</a>
613
     * $I->seeLink('Logout','/logout'); // matches <a href="/logout">Logout</a>
614
     * ?>
615
     * ```
616
     *
617
     * @param      $text
618
     * @param null $url
619
     * Conditional Assertion: Test won't be stopped on fail
620
     * @see \Codeception\Lib\InnerBrowser::seeLink()
621
     */
622
    public function canSeeLink($text, $url = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $text is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $url is not used and could be removed.

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

Loading history...
623
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeLink', func_get_args()));
624
    }
625
    /**
626
     * [!] Method is generated. Documentation taken from corresponding module.
627
     *
628
     * Checks that there's a link with the specified text.
629
     * Give a full URL as the second parameter to match links with that exact URL.
630
     *
631
     * ``` php
632
     * <?php
633
     * $I->seeLink('Logout'); // matches <a href="#">Logout</a>
634
     * $I->seeLink('Logout','/logout'); // matches <a href="/logout">Logout</a>
635
     * ?>
636
     * ```
637
     *
638
     * @param      $text
639
     * @param null $url
640
     * @see \Codeception\Lib\InnerBrowser::seeLink()
641
     */
642
    public function seeLink($text, $url = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $text is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $url is not used and could be removed.

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

Loading history...
643
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeLink', func_get_args()));
644
    }
645
646
 
647
    /**
648
     * [!] Method is generated. Documentation taken from corresponding module.
649
     *
650
     * Checks that the page doesn't contain a link with the given string.
651
     * If the second parameter is given, only links with a matching "href" attribute will be checked.
652
     *
653
     * ``` php
654
     * <?php
655
     * $I->dontSeeLink('Logout'); // I suppose user is not logged in
656
     * $I->dontSeeLink('Checkout now', '/store/cart.php');
657
     * ?>
658
     * ```
659
     *
660
     * @param $text
661
     * @param null $url
662
     * Conditional Assertion: Test won't be stopped on fail
663
     * @see \Codeception\Lib\InnerBrowser::dontSeeLink()
664
     */
665
    public function cantSeeLink($text, $url = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $text is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $url is not used and could be removed.

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

Loading history...
666
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeLink', func_get_args()));
667
    }
668
    /**
669
     * [!] Method is generated. Documentation taken from corresponding module.
670
     *
671
     * Checks that the page doesn't contain a link with the given string.
672
     * If the second parameter is given, only links with a matching "href" attribute will be checked.
673
     *
674
     * ``` php
675
     * <?php
676
     * $I->dontSeeLink('Logout'); // I suppose user is not logged in
677
     * $I->dontSeeLink('Checkout now', '/store/cart.php');
678
     * ?>
679
     * ```
680
     *
681
     * @param $text
682
     * @param null $url
683
     * @see \Codeception\Lib\InnerBrowser::dontSeeLink()
684
     */
685
    public function dontSeeLink($text, $url = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $text is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $url is not used and could be removed.

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

Loading history...
686
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeLink', func_get_args()));
687
    }
688
689
 
690
    /**
691
     * [!] Method is generated. Documentation taken from corresponding module.
692
     *
693
     * Checks that current URI contains the given string.
694
     *
695
     * ``` php
696
     * <?php
697
     * // to match: /home/dashboard
698
     * $I->seeInCurrentUrl('home');
699
     * // to match: /users/1
700
     * $I->seeInCurrentUrl('/users/');
701
     * ?>
702
     * ```
703
     *
704
     * @param $uri
705
     * Conditional Assertion: Test won't be stopped on fail
706
     * @see \Codeception\Lib\InnerBrowser::seeInCurrentUrl()
707
     */
708
    public function canSeeInCurrentUrl($uri) {
0 ignored issues
show
Unused Code introduced by
The parameter $uri is not used and could be removed.

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

Loading history...
709
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInCurrentUrl', func_get_args()));
710
    }
711
    /**
712
     * [!] Method is generated. Documentation taken from corresponding module.
713
     *
714
     * Checks that current URI contains the given string.
715
     *
716
     * ``` php
717
     * <?php
718
     * // to match: /home/dashboard
719
     * $I->seeInCurrentUrl('home');
720
     * // to match: /users/1
721
     * $I->seeInCurrentUrl('/users/');
722
     * ?>
723
     * ```
724
     *
725
     * @param $uri
726
     * @see \Codeception\Lib\InnerBrowser::seeInCurrentUrl()
727
     */
728
    public function seeInCurrentUrl($uri) {
0 ignored issues
show
Unused Code introduced by
The parameter $uri is not used and could be removed.

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

Loading history...
729
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInCurrentUrl', func_get_args()));
730
    }
731
732
 
733
    /**
734
     * [!] Method is generated. Documentation taken from corresponding module.
735
     *
736
     * Checks that the current URI doesn't contain the given string.
737
     *
738
     * ``` php
739
     * <?php
740
     * $I->dontSeeInCurrentUrl('/users/');
741
     * ?>
742
     * ```
743
     *
744
     * @param $uri
745
     * Conditional Assertion: Test won't be stopped on fail
746
     * @see \Codeception\Lib\InnerBrowser::dontSeeInCurrentUrl()
747
     */
748
    public function cantSeeInCurrentUrl($uri) {
0 ignored issues
show
Unused Code introduced by
The parameter $uri is not used and could be removed.

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

Loading history...
749
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInCurrentUrl', func_get_args()));
750
    }
751
    /**
752
     * [!] Method is generated. Documentation taken from corresponding module.
753
     *
754
     * Checks that the current URI doesn't contain the given string.
755
     *
756
     * ``` php
757
     * <?php
758
     * $I->dontSeeInCurrentUrl('/users/');
759
     * ?>
760
     * ```
761
     *
762
     * @param $uri
763
     * @see \Codeception\Lib\InnerBrowser::dontSeeInCurrentUrl()
764
     */
765
    public function dontSeeInCurrentUrl($uri) {
0 ignored issues
show
Unused Code introduced by
The parameter $uri is not used and could be removed.

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

Loading history...
766
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInCurrentUrl', func_get_args()));
767
    }
768
769
 
770
    /**
771
     * [!] Method is generated. Documentation taken from corresponding module.
772
     *
773
     * Checks that the current URL is equal to the given string.
774
     * Unlike `seeInCurrentUrl`, this only matches the full URL.
775
     *
776
     * ``` php
777
     * <?php
778
     * // to match root url
779
     * $I->seeCurrentUrlEquals('/');
780
     * ?>
781
     * ```
782
     *
783
     * @param $uri
784
     * Conditional Assertion: Test won't be stopped on fail
785
     * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlEquals()
786
     */
787
    public function canSeeCurrentUrlEquals($uri) {
0 ignored issues
show
Unused Code introduced by
The parameter $uri is not used and could be removed.

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

Loading history...
788
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlEquals', func_get_args()));
789
    }
790
    /**
791
     * [!] Method is generated. Documentation taken from corresponding module.
792
     *
793
     * Checks that the current URL is equal to the given string.
794
     * Unlike `seeInCurrentUrl`, this only matches the full URL.
795
     *
796
     * ``` php
797
     * <?php
798
     * // to match root url
799
     * $I->seeCurrentUrlEquals('/');
800
     * ?>
801
     * ```
802
     *
803
     * @param $uri
804
     * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlEquals()
805
     */
806
    public function seeCurrentUrlEquals($uri) {
0 ignored issues
show
Unused Code introduced by
The parameter $uri is not used and could be removed.

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

Loading history...
807
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCurrentUrlEquals', func_get_args()));
808
    }
809
810
 
811
    /**
812
     * [!] Method is generated. Documentation taken from corresponding module.
813
     *
814
     * Checks that the current URL doesn't equal the given string.
815
     * Unlike `dontSeeInCurrentUrl`, this only matches the full URL.
816
     *
817
     * ``` php
818
     * <?php
819
     * // current url is not root
820
     * $I->dontSeeCurrentUrlEquals('/');
821
     * ?>
822
     * ```
823
     *
824
     * @param $uri
825
     * Conditional Assertion: Test won't be stopped on fail
826
     * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlEquals()
827
     */
828
    public function cantSeeCurrentUrlEquals($uri) {
0 ignored issues
show
Unused Code introduced by
The parameter $uri is not used and could be removed.

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

Loading history...
829
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlEquals', func_get_args()));
830
    }
831
    /**
832
     * [!] Method is generated. Documentation taken from corresponding module.
833
     *
834
     * Checks that the current URL doesn't equal the given string.
835
     * Unlike `dontSeeInCurrentUrl`, this only matches the full URL.
836
     *
837
     * ``` php
838
     * <?php
839
     * // current url is not root
840
     * $I->dontSeeCurrentUrlEquals('/');
841
     * ?>
842
     * ```
843
     *
844
     * @param $uri
845
     * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlEquals()
846
     */
847
    public function dontSeeCurrentUrlEquals($uri) {
0 ignored issues
show
Unused Code introduced by
The parameter $uri is not used and could be removed.

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

Loading history...
848
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlEquals', func_get_args()));
849
    }
850
851
 
852
    /**
853
     * [!] Method is generated. Documentation taken from corresponding module.
854
     *
855
     * Checks that the current URL matches the given regular expression.
856
     *
857
     * ``` php
858
     * <?php
859
     * // to match root url
860
     * $I->seeCurrentUrlMatches('~$/users/(\d+)~');
861
     * ?>
862
     * ```
863
     *
864
     * @param $uri
865
     * Conditional Assertion: Test won't be stopped on fail
866
     * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlMatches()
867
     */
868
    public function canSeeCurrentUrlMatches($uri) {
0 ignored issues
show
Unused Code introduced by
The parameter $uri is not used and could be removed.

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

Loading history...
869
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlMatches', func_get_args()));
870
    }
871
    /**
872
     * [!] Method is generated. Documentation taken from corresponding module.
873
     *
874
     * Checks that the current URL matches the given regular expression.
875
     *
876
     * ``` php
877
     * <?php
878
     * // to match root url
879
     * $I->seeCurrentUrlMatches('~$/users/(\d+)~');
880
     * ?>
881
     * ```
882
     *
883
     * @param $uri
884
     * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlMatches()
885
     */
886
    public function seeCurrentUrlMatches($uri) {
0 ignored issues
show
Unused Code introduced by
The parameter $uri is not used and could be removed.

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

Loading history...
887
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCurrentUrlMatches', func_get_args()));
888
    }
889
890
 
891
    /**
892
     * [!] Method is generated. Documentation taken from corresponding module.
893
     *
894
     * Checks that current url doesn't match the given regular expression.
895
     *
896
     * ``` php
897
     * <?php
898
     * // to match root url
899
     * $I->dontSeeCurrentUrlMatches('~$/users/(\d+)~');
900
     * ?>
901
     * ```
902
     *
903
     * @param $uri
904
     * Conditional Assertion: Test won't be stopped on fail
905
     * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlMatches()
906
     */
907
    public function cantSeeCurrentUrlMatches($uri) {
0 ignored issues
show
Unused Code introduced by
The parameter $uri is not used and could be removed.

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

Loading history...
908
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlMatches', func_get_args()));
909
    }
910
    /**
911
     * [!] Method is generated. Documentation taken from corresponding module.
912
     *
913
     * Checks that current url doesn't match the given regular expression.
914
     *
915
     * ``` php
916
     * <?php
917
     * // to match root url
918
     * $I->dontSeeCurrentUrlMatches('~$/users/(\d+)~');
919
     * ?>
920
     * ```
921
     *
922
     * @param $uri
923
     * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlMatches()
924
     */
925
    public function dontSeeCurrentUrlMatches($uri) {
0 ignored issues
show
Unused Code introduced by
The parameter $uri is not used and could be removed.

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

Loading history...
926
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlMatches', func_get_args()));
927
    }
928
929
 
930
    /**
931
     * [!] Method is generated. Documentation taken from corresponding module.
932
     *
933
     * Executes the given regular expression against the current URI and returns the first match.
934
     * If no parameters are provided, the full URI is returned.
935
     *
936
     * ``` php
937
     * <?php
938
     * $user_id = $I->grabFromCurrentUrl('~$/user/(\d+)/~');
939
     * $uri = $I->grabFromCurrentUrl();
940
     * ?>
941
     * ```
942
     *
943
     * @param null $uri
944
     *
945
     * @return mixed
946
     * @see \Codeception\Lib\InnerBrowser::grabFromCurrentUrl()
947
     */
948
    public function grabFromCurrentUrl($uri = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $uri is not used and could be removed.

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

Loading history...
949
        return $this->getScenario()->runStep(new \Codeception\Step\Action('grabFromCurrentUrl', func_get_args()));
950
    }
951
952
 
953
    /**
954
     * [!] Method is generated. Documentation taken from corresponding module.
955
     *
956
     * Checks that the specified checkbox is checked.
957
     *
958
     * ``` php
959
     * <?php
960
     * $I->seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms
961
     * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form.
962
     * $I->seeCheckboxIsChecked('//form/input[@type=checkbox and @name=agree]');
963
     * ?>
964
     * ```
965
     *
966
     * @param $checkbox
967
     * Conditional Assertion: Test won't be stopped on fail
968
     * @see \Codeception\Lib\InnerBrowser::seeCheckboxIsChecked()
969
     */
970
    public function canSeeCheckboxIsChecked($checkbox) {
0 ignored issues
show
Unused Code introduced by
The parameter $checkbox is not used and could be removed.

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

Loading history...
971
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCheckboxIsChecked', func_get_args()));
972
    }
973
    /**
974
     * [!] Method is generated. Documentation taken from corresponding module.
975
     *
976
     * Checks that the specified checkbox is checked.
977
     *
978
     * ``` php
979
     * <?php
980
     * $I->seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms
981
     * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form.
982
     * $I->seeCheckboxIsChecked('//form/input[@type=checkbox and @name=agree]');
983
     * ?>
984
     * ```
985
     *
986
     * @param $checkbox
987
     * @see \Codeception\Lib\InnerBrowser::seeCheckboxIsChecked()
988
     */
989
    public function seeCheckboxIsChecked($checkbox) {
0 ignored issues
show
Unused Code introduced by
The parameter $checkbox is not used and could be removed.

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

Loading history...
990
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCheckboxIsChecked', func_get_args()));
991
    }
992
993
 
994
    /**
995
     * [!] Method is generated. Documentation taken from corresponding module.
996
     *
997
     * Check that the specified checkbox is unchecked.
998
     *
999
     * ``` php
1000
     * <?php
1001
     * $I->dontSeeCheckboxIsChecked('#agree'); // I suppose user didn't agree to terms
1002
     * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user didn't check the first checkbox in form.
1003
     * ?>
1004
     * ```
1005
     *
1006
     * @param $checkbox
1007
     * Conditional Assertion: Test won't be stopped on fail
1008
     * @see \Codeception\Lib\InnerBrowser::dontSeeCheckboxIsChecked()
1009
     */
1010
    public function cantSeeCheckboxIsChecked($checkbox) {
0 ignored issues
show
Unused Code introduced by
The parameter $checkbox is not used and could be removed.

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

Loading history...
1011
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCheckboxIsChecked', func_get_args()));
1012
    }
1013
    /**
1014
     * [!] Method is generated. Documentation taken from corresponding module.
1015
     *
1016
     * Check that the specified checkbox is unchecked.
1017
     *
1018
     * ``` php
1019
     * <?php
1020
     * $I->dontSeeCheckboxIsChecked('#agree'); // I suppose user didn't agree to terms
1021
     * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user didn't check the first checkbox in form.
1022
     * ?>
1023
     * ```
1024
     *
1025
     * @param $checkbox
1026
     * @see \Codeception\Lib\InnerBrowser::dontSeeCheckboxIsChecked()
1027
     */
1028
    public function dontSeeCheckboxIsChecked($checkbox) {
0 ignored issues
show
Unused Code introduced by
The parameter $checkbox is not used and could be removed.

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

Loading history...
1029
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCheckboxIsChecked', func_get_args()));
1030
    }
1031
1032
 
1033
    /**
1034
     * [!] Method is generated. Documentation taken from corresponding module.
1035
     *
1036
     * Checks that the given input field or textarea contains the given value.
1037
     * For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
1038
     *
1039
     * ``` php
1040
     * <?php
1041
     * $I->seeInField('Body','Type your comment here');
1042
     * $I->seeInField('form textarea[name=body]','Type your comment here');
1043
     * $I->seeInField('form input[type=hidden]','hidden_value');
1044
     * $I->seeInField('#searchform input','Search');
1045
     * $I->seeInField('//form/*[@name=search]','Search');
1046
     * $I->seeInField(['name' => 'search'], 'Search');
1047
     * ?>
1048
     * ```
1049
     *
1050
     * @param $field
1051
     * @param $value
1052
     * Conditional Assertion: Test won't be stopped on fail
1053
     * @see \Codeception\Lib\InnerBrowser::seeInField()
1054
     */
1055
    public function canSeeInField($field, $value) {
0 ignored issues
show
Unused Code introduced by
The parameter $field is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $value is not used and could be removed.

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

Loading history...
1056
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInField', func_get_args()));
1057
    }
1058
    /**
1059
     * [!] Method is generated. Documentation taken from corresponding module.
1060
     *
1061
     * Checks that the given input field or textarea contains the given value.
1062
     * For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
1063
     *
1064
     * ``` php
1065
     * <?php
1066
     * $I->seeInField('Body','Type your comment here');
1067
     * $I->seeInField('form textarea[name=body]','Type your comment here');
1068
     * $I->seeInField('form input[type=hidden]','hidden_value');
1069
     * $I->seeInField('#searchform input','Search');
1070
     * $I->seeInField('//form/*[@name=search]','Search');
1071
     * $I->seeInField(['name' => 'search'], 'Search');
1072
     * ?>
1073
     * ```
1074
     *
1075
     * @param $field
1076
     * @param $value
1077
     * @see \Codeception\Lib\InnerBrowser::seeInField()
1078
     */
1079
    public function seeInField($field, $value) {
0 ignored issues
show
Unused Code introduced by
The parameter $field is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $value is not used and could be removed.

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

Loading history...
1080
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInField', func_get_args()));
1081
    }
1082
1083
 
1084
    /**
1085
     * [!] Method is generated. Documentation taken from corresponding module.
1086
     *
1087
     * Checks that an input field or textarea doesn't contain the given value.
1088
     * For fuzzy locators, the field is matched by label text, CSS and XPath.
1089
     *
1090
     * ``` php
1091
     * <?php
1092
     * $I->dontSeeInField('Body','Type your comment here');
1093
     * $I->dontSeeInField('form textarea[name=body]','Type your comment here');
1094
     * $I->dontSeeInField('form input[type=hidden]','hidden_value');
1095
     * $I->dontSeeInField('#searchform input','Search');
1096
     * $I->dontSeeInField('//form/*[@name=search]','Search');
1097
     * $I->dontSeeInField(['name' => 'search'], 'Search');
1098
     * ?>
1099
     * ```
1100
     *
1101
     * @param $field
1102
     * @param $value
1103
     * Conditional Assertion: Test won't be stopped on fail
1104
     * @see \Codeception\Lib\InnerBrowser::dontSeeInField()
1105
     */
1106
    public function cantSeeInField($field, $value) {
0 ignored issues
show
Unused Code introduced by
The parameter $field is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $value is not used and could be removed.

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

Loading history...
1107
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInField', func_get_args()));
1108
    }
1109
    /**
1110
     * [!] Method is generated. Documentation taken from corresponding module.
1111
     *
1112
     * Checks that an input field or textarea doesn't contain the given value.
1113
     * For fuzzy locators, the field is matched by label text, CSS and XPath.
1114
     *
1115
     * ``` php
1116
     * <?php
1117
     * $I->dontSeeInField('Body','Type your comment here');
1118
     * $I->dontSeeInField('form textarea[name=body]','Type your comment here');
1119
     * $I->dontSeeInField('form input[type=hidden]','hidden_value');
1120
     * $I->dontSeeInField('#searchform input','Search');
1121
     * $I->dontSeeInField('//form/*[@name=search]','Search');
1122
     * $I->dontSeeInField(['name' => 'search'], 'Search');
1123
     * ?>
1124
     * ```
1125
     *
1126
     * @param $field
1127
     * @param $value
1128
     * @see \Codeception\Lib\InnerBrowser::dontSeeInField()
1129
     */
1130
    public function dontSeeInField($field, $value) {
0 ignored issues
show
Unused Code introduced by
The parameter $field is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $value is not used and could be removed.

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

Loading history...
1131
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInField', func_get_args()));
1132
    }
1133
1134
 
1135
    /**
1136
     * [!] Method is generated. Documentation taken from corresponding module.
1137
     *
1138
     * Checks if the array of form parameters (name => value) are set on the form matched with the
1139
     * passed selector.
1140
     *
1141
     * ``` php
1142
     * <?php
1143
     * $I->seeInFormFields('form[name=myform]', [
1144
     *      'input1' => 'value',
1145
     *      'input2' => 'other value',
1146
     * ]);
1147
     * ?>
1148
     * ```
1149
     *
1150
     * For multi-select elements, or to check values of multiple elements with the same name, an
1151
     * array may be passed:
1152
     *
1153
     * ``` php
1154
     * <?php
1155
     * $I->seeInFormFields('.form-class', [
1156
     *      'multiselect' => [
1157
     *          'value1',
1158
     *          'value2',
1159
     *      ],
1160
     *      'checkbox[]' => [
1161
     *          'a checked value',
1162
     *          'another checked value',
1163
     *      ],
1164
     * ]);
1165
     * ?>
1166
     * ```
1167
     *
1168
     * Additionally, checkbox values can be checked with a boolean.
1169
     *
1170
     * ``` php
1171
     * <?php
1172
     * $I->seeInFormFields('#form-id', [
1173
     *      'checkbox1' => true,        // passes if checked
1174
     *      'checkbox2' => false,       // passes if unchecked
1175
     * ]);
1176
     * ?>
1177
     * ```
1178
     *
1179
     * Pair this with submitForm for quick testing magic.
1180
     *
1181
     * ``` php
1182
     * <?php
1183
     * $form = [
1184
     *      'field1' => 'value',
1185
     *      'field2' => 'another value',
1186
     *      'checkbox1' => true,
1187
     *      // ...
1188
     * ];
1189
     * $I->submitForm('//form[@id=my-form]', $form, 'submitButton');
1190
     * // $I->amOnPage('/path/to/form-page') may be needed
1191
     * $I->seeInFormFields('//form[@id=my-form]', $form);
1192
     * ?>
1193
     * ```
1194
     *
1195
     * @param $formSelector
1196
     * @param $params
1197
     * Conditional Assertion: Test won't be stopped on fail
1198
     * @see \Codeception\Lib\InnerBrowser::seeInFormFields()
1199
     */
1200
    public function canSeeInFormFields($formSelector, $params) {
0 ignored issues
show
Unused Code introduced by
The parameter $formSelector is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

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

Loading history...
1201
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInFormFields', func_get_args()));
1202
    }
1203
    /**
1204
     * [!] Method is generated. Documentation taken from corresponding module.
1205
     *
1206
     * Checks if the array of form parameters (name => value) are set on the form matched with the
1207
     * passed selector.
1208
     *
1209
     * ``` php
1210
     * <?php
1211
     * $I->seeInFormFields('form[name=myform]', [
1212
     *      'input1' => 'value',
1213
     *      'input2' => 'other value',
1214
     * ]);
1215
     * ?>
1216
     * ```
1217
     *
1218
     * For multi-select elements, or to check values of multiple elements with the same name, an
1219
     * array may be passed:
1220
     *
1221
     * ``` php
1222
     * <?php
1223
     * $I->seeInFormFields('.form-class', [
1224
     *      'multiselect' => [
1225
     *          'value1',
1226
     *          'value2',
1227
     *      ],
1228
     *      'checkbox[]' => [
1229
     *          'a checked value',
1230
     *          'another checked value',
1231
     *      ],
1232
     * ]);
1233
     * ?>
1234
     * ```
1235
     *
1236
     * Additionally, checkbox values can be checked with a boolean.
1237
     *
1238
     * ``` php
1239
     * <?php
1240
     * $I->seeInFormFields('#form-id', [
1241
     *      'checkbox1' => true,        // passes if checked
1242
     *      'checkbox2' => false,       // passes if unchecked
1243
     * ]);
1244
     * ?>
1245
     * ```
1246
     *
1247
     * Pair this with submitForm for quick testing magic.
1248
     *
1249
     * ``` php
1250
     * <?php
1251
     * $form = [
1252
     *      'field1' => 'value',
1253
     *      'field2' => 'another value',
1254
     *      'checkbox1' => true,
1255
     *      // ...
1256
     * ];
1257
     * $I->submitForm('//form[@id=my-form]', $form, 'submitButton');
1258
     * // $I->amOnPage('/path/to/form-page') may be needed
1259
     * $I->seeInFormFields('//form[@id=my-form]', $form);
1260
     * ?>
1261
     * ```
1262
     *
1263
     * @param $formSelector
1264
     * @param $params
1265
     * @see \Codeception\Lib\InnerBrowser::seeInFormFields()
1266
     */
1267
    public function seeInFormFields($formSelector, $params) {
0 ignored issues
show
Unused Code introduced by
The parameter $formSelector is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

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

Loading history...
1268
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInFormFields', func_get_args()));
1269
    }
1270
1271
 
1272
    /**
1273
     * [!] Method is generated. Documentation taken from corresponding module.
1274
     *
1275
     * Checks if the array of form parameters (name => value) are not set on the form matched with
1276
     * the passed selector.
1277
     *
1278
     * ``` php
1279
     * <?php
1280
     * $I->dontSeeInFormFields('form[name=myform]', [
1281
     *      'input1' => 'non-existent value',
1282
     *      'input2' => 'other non-existent value',
1283
     * ]);
1284
     * ?>
1285
     * ```
1286
     *
1287
     * To check that an element hasn't been assigned any one of many values, an array can be passed
1288
     * as the value:
1289
     *
1290
     * ``` php
1291
     * <?php
1292
     * $I->dontSeeInFormFields('.form-class', [
1293
     *      'fieldName' => [
1294
     *          'This value shouldn\'t be set',
1295
     *          'And this value shouldn\'t be set',
1296
     *      ],
1297
     * ]);
1298
     * ?>
1299
     * ```
1300
     *
1301
     * Additionally, checkbox values can be checked with a boolean.
1302
     *
1303
     * ``` php
1304
     * <?php
1305
     * $I->dontSeeInFormFields('#form-id', [
1306
     *      'checkbox1' => true,        // fails if checked
1307
     *      'checkbox2' => false,       // fails if unchecked
1308
     * ]);
1309
     * ?>
1310
     * ```
1311
     *
1312
     * @param $formSelector
1313
     * @param $params
1314
     * Conditional Assertion: Test won't be stopped on fail
1315
     * @see \Codeception\Lib\InnerBrowser::dontSeeInFormFields()
1316
     */
1317
    public function cantSeeInFormFields($formSelector, $params) {
0 ignored issues
show
Unused Code introduced by
The parameter $formSelector is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

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

Loading history...
1318
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInFormFields', func_get_args()));
1319
    }
1320
    /**
1321
     * [!] Method is generated. Documentation taken from corresponding module.
1322
     *
1323
     * Checks if the array of form parameters (name => value) are not set on the form matched with
1324
     * the passed selector.
1325
     *
1326
     * ``` php
1327
     * <?php
1328
     * $I->dontSeeInFormFields('form[name=myform]', [
1329
     *      'input1' => 'non-existent value',
1330
     *      'input2' => 'other non-existent value',
1331
     * ]);
1332
     * ?>
1333
     * ```
1334
     *
1335
     * To check that an element hasn't been assigned any one of many values, an array can be passed
1336
     * as the value:
1337
     *
1338
     * ``` php
1339
     * <?php
1340
     * $I->dontSeeInFormFields('.form-class', [
1341
     *      'fieldName' => [
1342
     *          'This value shouldn\'t be set',
1343
     *          'And this value shouldn\'t be set',
1344
     *      ],
1345
     * ]);
1346
     * ?>
1347
     * ```
1348
     *
1349
     * Additionally, checkbox values can be checked with a boolean.
1350
     *
1351
     * ``` php
1352
     * <?php
1353
     * $I->dontSeeInFormFields('#form-id', [
1354
     *      'checkbox1' => true,        // fails if checked
1355
     *      'checkbox2' => false,       // fails if unchecked
1356
     * ]);
1357
     * ?>
1358
     * ```
1359
     *
1360
     * @param $formSelector
1361
     * @param $params
1362
     * @see \Codeception\Lib\InnerBrowser::dontSeeInFormFields()
1363
     */
1364
    public function dontSeeInFormFields($formSelector, $params) {
0 ignored issues
show
Unused Code introduced by
The parameter $formSelector is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

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

Loading history...
1365
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInFormFields', func_get_args()));
1366
    }
1367
1368
 
1369
    /**
1370
     * [!] Method is generated. Documentation taken from corresponding module.
1371
     *
1372
     * Submits the given form on the page, optionally with the given form
1373
     * values.  Pass the form field's values as an array in the second
1374
     * parameter.
1375
     *
1376
     * Although this function can be used as a short-hand version of
1377
     * `fillField()`, `selectOption()`, `click()` etc. it has some important
1378
     * differences:
1379
     *
1380
     *  * Only field *names* may be used, not CSS/XPath selectors nor field labels
1381
     *  * If a field is sent to this function that does *not* exist on the page,
1382
     *    it will silently be added to the HTTP request.  This is helpful for testing
1383
     *    some types of forms, but be aware that you will *not* get an exception
1384
     *    like you would if you called `fillField()` or `selectOption()` with
1385
     *    a missing field.
1386
     *
1387
     * Fields that are not provided will be filled by their values from the page,
1388
     * or from any previous calls to `fillField()`, `selectOption()` etc.
1389
     * You don't need to click the 'Submit' button afterwards.
1390
     * This command itself triggers the request to form's action.
1391
     *
1392
     * You can optionally specify which button's value to include
1393
     * in the request with the last parameter (as an alternative to
1394
     * explicitly setting its value in the second parameter), as
1395
     * button values are not otherwise included in the request.
1396
     *
1397
     * Examples:
1398
     *
1399
     * ``` php
1400
     * <?php
1401
     * $I->submitForm('#login', [
1402
     *     'login' => 'davert',
1403
     *     'password' => '123456'
1404
     * ]);
1405
     * // or
1406
     * $I->submitForm('#login', [
1407
     *     'login' => 'davert',
1408
     *     'password' => '123456'
1409
     * ], 'submitButtonName');
1410
     *
1411
     * ```
1412
     *
1413
     * For example, given this sample "Sign Up" form:
1414
     *
1415
     * ``` html
1416
     * <form action="/sign_up">
1417
     *     Login:
1418
     *     <input type="text" name="user[login]" /><br/>
1419
     *     Password:
1420
     *     <input type="password" name="user[password]" /><br/>
1421
     *     Do you agree to our terms?
1422
     *     <input type="checkbox" name="user[agree]" /><br/>
1423
     *     Select pricing plan:
1424
     *     <select name="plan">
1425
     *         <option value="1">Free</option>
1426
     *         <option value="2" selected="selected">Paid</option>
1427
     *     </select>
1428
     *     <input type="submit" name="submitButton" value="Submit" />
1429
     * </form>
1430
     * ```
1431
     *
1432
     * You could write the following to submit it:
1433
     *
1434
     * ``` php
1435
     * <?php
1436
     * $I->submitForm(
1437
     *     '#userForm',
1438
     *     [
1439
     *         'user' => [
1440
     *             'login' => 'Davert',
1441
     *             'password' => '123456',
1442
     *             'agree' => true
1443
     *         ]
1444
     *     ],
1445
     *     'submitButton'
1446
     * );
1447
     * ```
1448
     * Note that "2" will be the submitted value for the "plan" field, as it is
1449
     * the selected option.
1450
     *
1451
     * You can also emulate a JavaScript submission by not specifying any
1452
     * buttons in the third parameter to submitForm.
1453
     *
1454
     * ```php
1455
     * <?php
1456
     * $I->submitForm(
1457
     *     '#userForm',
1458
     *     [
1459
     *         'user' => [
1460
     *             'login' => 'Davert',
1461
     *             'password' => '123456',
1462
     *             'agree' => true
1463
     *         ]
1464
     *     ]
1465
     * );
1466
     * ```
1467
     *
1468
     * This function works well when paired with `seeInFormFields()`
1469
     * for quickly testing CRUD interfaces and form validation logic.
1470
     *
1471
     * ``` php
1472
     * <?php
1473
     * $form = [
1474
     *      'field1' => 'value',
1475
     *      'field2' => 'another value',
1476
     *      'checkbox1' => true,
1477
     *      // ...
1478
     * ];
1479
     * $I->submitForm('#my-form', $form, 'submitButton');
1480
     * // $I->amOnPage('/path/to/form-page') may be needed
1481
     * $I->seeInFormFields('#my-form', $form);
1482
     * ```
1483
     *
1484
     * Parameter values can be set to arrays for multiple input fields
1485
     * of the same name, or multi-select combo boxes.  For checkboxes,
1486
     * you can use either the string value or boolean `true`/`false` which will
1487
     * be replaced by the checkbox's value in the DOM.
1488
     *
1489
     * ``` php
1490
     * <?php
1491
     * $I->submitForm('#my-form', [
1492
     *      'field1' => 'value',
1493
     *      'checkbox' => [
1494
     *          'value of first checkbox',
1495
     *          'value of second checkbox',
1496
     *      ],
1497
     *      'otherCheckboxes' => [
1498
     *          true,
1499
     *          false,
1500
     *          false
1501
     *      ],
1502
     *      'multiselect' => [
1503
     *          'first option value',
1504
     *          'second option value'
1505
     *      ]
1506
     * ]);
1507
     * ```
1508
     *
1509
     * Mixing string and boolean values for a checkbox's value is not supported
1510
     * and may produce unexpected results.
1511
     *
1512
     * Field names ending in `[]` must be passed without the trailing square
1513
     * bracket characters, and must contain an array for its value.  This allows
1514
     * submitting multiple values with the same name, consider:
1515
     *
1516
     * ```php
1517
     * <?php
1518
     * // This will NOT work correctly
1519
     * $I->submitForm('#my-form', [
1520
     *     'field[]' => 'value',
1521
     *     'field[]' => 'another value',  // 'field[]' is already a defined key
1522
     * ]);
1523
     * ```
1524
     *
1525
     * The solution is to pass an array value:
1526
     *
1527
     * ```php
1528
     * <?php
1529
     * // This way both values are submitted
1530
     * $I->submitForm('#my-form', [
1531
     *     'field' => [
1532
     *         'value',
1533
     *         'another value',
1534
     *     ]
1535
     * ]);
1536
     * ```
1537
     *
1538
     * @param $selector
1539
     * @param $params
1540
     * @param $button
1541
     * @see \Codeception\Lib\InnerBrowser::submitForm()
1542
     */
1543
    public function submitForm($selector, $params, $button = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $selector is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $button is not used and could be removed.

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

Loading history...
1544
        return $this->getScenario()->runStep(new \Codeception\Step\Action('submitForm', func_get_args()));
1545
    }
1546
1547
 
1548
    /**
1549
     * [!] Method is generated. Documentation taken from corresponding module.
1550
     *
1551
     * Fills a text field or textarea with the given string.
1552
     *
1553
     * ``` php
1554
     * <?php
1555
     * $I->fillField("//input[@type='text']", "Hello World!");
1556
     * $I->fillField(['name' => 'email'], '[email protected]');
1557
     * ?>
1558
     * ```
1559
     *
1560
     * @param $field
1561
     * @param $value
1562
     * @see \Codeception\Lib\InnerBrowser::fillField()
1563
     */
1564
    public function fillField($field, $value) {
0 ignored issues
show
Unused Code introduced by
The parameter $field is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $value is not used and could be removed.

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

Loading history...
1565
        return $this->getScenario()->runStep(new \Codeception\Step\Action('fillField', func_get_args()));
1566
    }
1567
1568
 
1569
    /**
1570
     * [!] Method is generated. Documentation taken from corresponding module.
1571
     *
1572
     * Selects an option in a select tag or in radio button group.
1573
     *
1574
     * ``` php
1575
     * <?php
1576
     * $I->selectOption('form select[name=account]', 'Premium');
1577
     * $I->selectOption('form input[name=payment]', 'Monthly');
1578
     * $I->selectOption('//form/select[@name=account]', 'Monthly');
1579
     * ?>
1580
     * ```
1581
     *
1582
     * Provide an array for the second argument to select multiple options:
1583
     *
1584
     * ``` php
1585
     * <?php
1586
     * $I->selectOption('Which OS do you use?', array('Windows','Linux'));
1587
     * ?>
1588
     * ```
1589
     *
1590
     * Or provide an associative array for the second argument to specifically define which selection method should be used:
1591
     *
1592
     * ``` php
1593
     * <?php
1594
     * $I->selectOption('Which OS do you use?', array('text' => 'Windows')); // Only search by text 'Windows'
1595
     * $I->selectOption('Which OS do you use?', array('value' => 'windows')); // Only search by value 'windows'
1596
     * ?>
1597
     * ```
1598
     *
1599
     * @param $select
1600
     * @param $option
1601
     * @see \Codeception\Lib\InnerBrowser::selectOption()
1602
     */
1603
    public function selectOption($select, $option) {
0 ignored issues
show
Unused Code introduced by
The parameter $select is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $option is not used and could be removed.

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

Loading history...
1604
        return $this->getScenario()->runStep(new \Codeception\Step\Action('selectOption', func_get_args()));
1605
    }
1606
1607
 
1608
    /**
1609
     * [!] Method is generated. Documentation taken from corresponding module.
1610
     *
1611
     * Ticks a checkbox. For radio buttons, use the `selectOption` method instead.
1612
     *
1613
     * ``` php
1614
     * <?php
1615
     * $I->checkOption('#agree');
1616
     * ?>
1617
     * ```
1618
     *
1619
     * @param $option
1620
     * @see \Codeception\Lib\InnerBrowser::checkOption()
1621
     */
1622
    public function checkOption($option) {
0 ignored issues
show
Unused Code introduced by
The parameter $option is not used and could be removed.

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

Loading history...
1623
        return $this->getScenario()->runStep(new \Codeception\Step\Action('checkOption', func_get_args()));
1624
    }
1625
1626
 
1627
    /**
1628
     * [!] Method is generated. Documentation taken from corresponding module.
1629
     *
1630
     * Unticks a checkbox.
1631
     *
1632
     * ``` php
1633
     * <?php
1634
     * $I->uncheckOption('#notify');
1635
     * ?>
1636
     * ```
1637
     *
1638
     * @param $option
1639
     * @see \Codeception\Lib\InnerBrowser::uncheckOption()
1640
     */
1641
    public function uncheckOption($option) {
0 ignored issues
show
Unused Code introduced by
The parameter $option is not used and could be removed.

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

Loading history...
1642
        return $this->getScenario()->runStep(new \Codeception\Step\Action('uncheckOption', func_get_args()));
1643
    }
1644
1645
 
1646
    /**
1647
     * [!] Method is generated. Documentation taken from corresponding module.
1648
     *
1649
     * Attaches a file relative to the Codeception data directory to the given file upload field.
1650
     *
1651
     * ``` php
1652
     * <?php
1653
     * // file is stored in 'tests/_data/prices.xls'
1654
     * $I->attachFile('input[@type="file"]', 'prices.xls');
1655
     * ?>
1656
     * ```
1657
     *
1658
     * @param $field
1659
     * @param $filename
1660
     * @see \Codeception\Lib\InnerBrowser::attachFile()
1661
     */
1662
    public function attachFile($field, $filename) {
0 ignored issues
show
Unused Code introduced by
The parameter $field is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $filename is not used and could be removed.

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

Loading history...
1663
        return $this->getScenario()->runStep(new \Codeception\Step\Action('attachFile', func_get_args()));
1664
    }
1665
1666
 
1667
    /**
1668
     * [!] Method is generated. Documentation taken from corresponding module.
1669
     *
1670
     * If your page triggers an ajax request, you can perform it manually.
1671
     * This action sends a GET ajax request with specified params.
1672
     *
1673
     * See ->sendAjaxPostRequest for examples.
1674
     *
1675
     * @param $uri
1676
     * @param $params
1677
     * @see \Codeception\Lib\InnerBrowser::sendAjaxGetRequest()
1678
     */
1679
    public function sendAjaxGetRequest($uri, $params = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $uri is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

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

Loading history...
1680
        return $this->getScenario()->runStep(new \Codeception\Step\Action('sendAjaxGetRequest', func_get_args()));
1681
    }
1682
1683
 
1684
    /**
1685
     * [!] Method is generated. Documentation taken from corresponding module.
1686
     *
1687
     * If your page triggers an ajax request, you can perform it manually.
1688
     * This action sends a POST ajax request with specified params.
1689
     * Additional params can be passed as array.
1690
     *
1691
     * Example:
1692
     *
1693
     * Imagine that by clicking checkbox you trigger ajax request which updates user settings.
1694
     * We emulate that click by running this ajax request manually.
1695
     *
1696
     * ``` php
1697
     * <?php
1698
     * $I->sendAjaxPostRequest('/updateSettings', array('notifications' => true)); // POST
1699
     * $I->sendAjaxGetRequest('/updateSettings', array('notifications' => true)); // GET
1700
     *
1701
     * ```
1702
     *
1703
     * @param $uri
1704
     * @param $params
1705
     * @see \Codeception\Lib\InnerBrowser::sendAjaxPostRequest()
1706
     */
1707
    public function sendAjaxPostRequest($uri, $params = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $uri is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

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

Loading history...
1708
        return $this->getScenario()->runStep(new \Codeception\Step\Action('sendAjaxPostRequest', func_get_args()));
1709
    }
1710
1711
 
1712
    /**
1713
     * [!] Method is generated. Documentation taken from corresponding module.
1714
     *
1715
     * If your page triggers an ajax request, you can perform it manually.
1716
     * This action sends an ajax request with specified method and params.
1717
     *
1718
     * Example:
1719
     *
1720
     * You need to perform an ajax request specifying the HTTP method.
1721
     *
1722
     * ``` php
1723
     * <?php
1724
     * $I->sendAjaxRequest('PUT', '/posts/7', array('title' => 'new title'));
1725
     *
1726
     * ```
1727
     *
1728
     * @param $method
1729
     * @param $uri
1730
     * @param $params
1731
     * @see \Codeception\Lib\InnerBrowser::sendAjaxRequest()
1732
     */
1733
    public function sendAjaxRequest($method, $uri, $params = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $method is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $uri is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

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

Loading history...
1734
        return $this->getScenario()->runStep(new \Codeception\Step\Action('sendAjaxRequest', func_get_args()));
1735
    }
1736
1737
 
1738
    /**
1739
     * [!] Method is generated. Documentation taken from corresponding module.
1740
     *
1741
     * Finds and returns the text contents of the given element.
1742
     * If a fuzzy locator is used, the element is found using CSS, XPath,
1743
     * and by matching the full page source by regular expression.
1744
     *
1745
     * ``` php
1746
     * <?php
1747
     * $heading = $I->grabTextFrom('h1');
1748
     * $heading = $I->grabTextFrom('descendant-or-self::h1');
1749
     * $value = $I->grabTextFrom('~<input value=(.*?)]~sgi'); // match with a regex
1750
     * ?>
1751
     * ```
1752
     *
1753
     * @param $cssOrXPathOrRegex
1754
     *
1755
     * @return mixed
1756
     * @see \Codeception\Lib\InnerBrowser::grabTextFrom()
1757
     */
1758
    public function grabTextFrom($cssOrXPathOrRegex) {
0 ignored issues
show
Unused Code introduced by
The parameter $cssOrXPathOrRegex is not used and could be removed.

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

Loading history...
1759
        return $this->getScenario()->runStep(new \Codeception\Step\Action('grabTextFrom', func_get_args()));
1760
    }
1761
1762
 
1763
    /**
1764
     * [!] Method is generated. Documentation taken from corresponding module.
1765
     *
1766
     * Grabs the value of the given attribute value from the given element.
1767
     * Fails if element is not found.
1768
     *
1769
     * ``` php
1770
     * <?php
1771
     * $I->grabAttributeFrom('#tooltip', 'title');
1772
     * ?>
1773
     * ```
1774
     *
1775
     *
1776
     * @param $cssOrXpath
1777
     * @param $attribute
1778
     *
1779
     * @return mixed
1780
     * @see \Codeception\Lib\InnerBrowser::grabAttributeFrom()
1781
     */
1782
    public function grabAttributeFrom($cssOrXpath, $attribute) {
0 ignored issues
show
Unused Code introduced by
The parameter $cssOrXpath is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $attribute is not used and could be removed.

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

Loading history...
1783
        return $this->getScenario()->runStep(new \Codeception\Step\Action('grabAttributeFrom', func_get_args()));
1784
    }
1785
1786
 
1787
    /**
1788
     * [!] Method is generated. Documentation taken from corresponding module.
1789
     *
1790
     * Grabs either the text content, or attribute values, of nodes
1791
     * matched by $cssOrXpath and returns them as an array.
1792
     *
1793
     * ```html
1794
     * <a href="#first">First</a>
1795
     * <a href="#second">Second</a>
1796
     * <a href="#third">Third</a>
1797
     * ```
1798
     *
1799
     * ```php
1800
     * <?php
1801
     * // would return ['First', 'Second', 'Third']
1802
     * $aLinkText = $I->grabMultiple('a');
1803
     *
1804
     * // would return ['#first', '#second', '#third']
1805
     * $aLinks = $I->grabMultiple('a', 'href');
1806
     * ?>
1807
     * ```
1808
     *
1809
     * @param $cssOrXpath
1810
     * @param $attribute
1811
     * @return string[]
1812
     * @see \Codeception\Lib\InnerBrowser::grabMultiple()
1813
     */
1814
    public function grabMultiple($cssOrXpath, $attribute = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $cssOrXpath is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $attribute is not used and could be removed.

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

Loading history...
1815
        return $this->getScenario()->runStep(new \Codeception\Step\Action('grabMultiple', func_get_args()));
1816
    }
1817
1818
 
1819
    /**
1820
     * [!] Method is generated. Documentation taken from corresponding module.
1821
     *
1822
     * @param $field
1823
     *
1824
     * @return array|mixed|null|string
1825
     * @see \Codeception\Lib\InnerBrowser::grabValueFrom()
1826
     */
1827
    public function grabValueFrom($field) {
0 ignored issues
show
Unused Code introduced by
The parameter $field is not used and could be removed.

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

Loading history...
1828
        return $this->getScenario()->runStep(new \Codeception\Step\Action('grabValueFrom', func_get_args()));
1829
    }
1830
1831
 
1832
    /**
1833
     * [!] Method is generated. Documentation taken from corresponding module.
1834
     *
1835
     * Sets a cookie with the given name and value.
1836
     * You can set additional cookie params like `domain`, `path`, `expires`, `secure` in array passed as last argument.
1837
     *
1838
     * ``` php
1839
     * <?php
1840
     * $I->setCookie('PHPSESSID', 'el4ukv0kqbvoirg7nkp4dncpk3');
1841
     * ?>
1842
     * ```
1843
     *
1844
     * @param $name
1845
     * @param $val
1846
     * @param array $params
1847
     *
1848
     * @return mixed
1849
     * @see \Codeception\Lib\InnerBrowser::setCookie()
1850
     */
1851
    public function setCookie($name, $val, $params = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $name is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $val is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

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

Loading history...
1852
        return $this->getScenario()->runStep(new \Codeception\Step\Action('setCookie', func_get_args()));
1853
    }
1854
1855
 
1856
    /**
1857
     * [!] Method is generated. Documentation taken from corresponding module.
1858
     *
1859
     * Grabs a cookie value.
1860
     * You can set additional cookie params like `domain`, `path` in array passed as last argument.
1861
     *
1862
     * @param $cookie
1863
     *
1864
     * @param array $params
1865
     * @return mixed
1866
     * @see \Codeception\Lib\InnerBrowser::grabCookie()
1867
     */
1868
    public function grabCookie($cookie, $params = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $cookie is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

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

Loading history...
1869
        return $this->getScenario()->runStep(new \Codeception\Step\Action('grabCookie', func_get_args()));
1870
    }
1871
1872
 
1873
    /**
1874
     * [!] Method is generated. Documentation taken from corresponding module.
1875
     *
1876
     * Grabs current page source code.
1877
     *
1878
     * @throws ModuleException if no page was opened.
1879
     *
1880
     * @return string Current page source code.
1881
     * @see \Codeception\Lib\InnerBrowser::grabPageSource()
1882
     */
1883
    public function grabPageSource() {
1884
        return $this->getScenario()->runStep(new \Codeception\Step\Action('grabPageSource', func_get_args()));
1885
    }
1886
1887
 
1888
    /**
1889
     * [!] Method is generated. Documentation taken from corresponding module.
1890
     *
1891
     * Checks that a cookie with the given name is set.
1892
     * You can set additional cookie params like `domain`, `path` as array passed in last argument.
1893
     *
1894
     * ``` php
1895
     * <?php
1896
     * $I->seeCookie('PHPSESSID');
1897
     * ?>
1898
     * ```
1899
     *
1900
     * @param $cookie
1901
     * @param array $params
1902
     * @return mixed
1903
     * Conditional Assertion: Test won't be stopped on fail
1904
     * @see \Codeception\Lib\InnerBrowser::seeCookie()
1905
     */
1906
    public function canSeeCookie($cookie, $params = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $cookie is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

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

Loading history...
1907
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCookie', func_get_args()));
1908
    }
1909
    /**
1910
     * [!] Method is generated. Documentation taken from corresponding module.
1911
     *
1912
     * Checks that a cookie with the given name is set.
1913
     * You can set additional cookie params like `domain`, `path` as array passed in last argument.
1914
     *
1915
     * ``` php
1916
     * <?php
1917
     * $I->seeCookie('PHPSESSID');
1918
     * ?>
1919
     * ```
1920
     *
1921
     * @param $cookie
1922
     * @param array $params
1923
     * @return mixed
1924
     * @see \Codeception\Lib\InnerBrowser::seeCookie()
1925
     */
1926
    public function seeCookie($cookie, $params = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $cookie is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

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

Loading history...
1927
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCookie', func_get_args()));
1928
    }
1929
1930
 
1931
    /**
1932
     * [!] Method is generated. Documentation taken from corresponding module.
1933
     *
1934
     * Checks that there isn't a cookie with the given name.
1935
     * You can set additional cookie params like `domain`, `path` as array passed in last argument.
1936
     *
1937
     * @param $cookie
1938
     *
1939
     * @param array $params
1940
     * @return mixed
1941
     * Conditional Assertion: Test won't be stopped on fail
1942
     * @see \Codeception\Lib\InnerBrowser::dontSeeCookie()
1943
     */
1944
    public function cantSeeCookie($cookie, $params = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $cookie is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

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

Loading history...
1945
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCookie', func_get_args()));
1946
    }
1947
    /**
1948
     * [!] Method is generated. Documentation taken from corresponding module.
1949
     *
1950
     * Checks that there isn't a cookie with the given name.
1951
     * You can set additional cookie params like `domain`, `path` as array passed in last argument.
1952
     *
1953
     * @param $cookie
1954
     *
1955
     * @param array $params
1956
     * @return mixed
1957
     * @see \Codeception\Lib\InnerBrowser::dontSeeCookie()
1958
     */
1959
    public function dontSeeCookie($cookie, $params = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $cookie is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

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

Loading history...
1960
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCookie', func_get_args()));
1961
    }
1962
1963
 
1964
    /**
1965
     * [!] Method is generated. Documentation taken from corresponding module.
1966
     *
1967
     * Unsets cookie with the given name.
1968
     * You can set additional cookie params like `domain`, `path` in array passed as last argument.
1969
     *
1970
     * @param $cookie
1971
     *
1972
     * @param array $params
1973
     * @return mixed
1974
     * @see \Codeception\Lib\InnerBrowser::resetCookie()
1975
     */
1976
    public function resetCookie($name, $params = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $name is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

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

Loading history...
1977
        return $this->getScenario()->runStep(new \Codeception\Step\Action('resetCookie', func_get_args()));
1978
    }
1979
1980
 
1981
    /**
1982
     * [!] Method is generated. Documentation taken from corresponding module.
1983
     *
1984
     * Checks that the given element exists on the page and is visible.
1985
     * You can also specify expected attributes of this element.
1986
     *
1987
     * ``` php
1988
     * <?php
1989
     * $I->seeElement('.error');
1990
     * $I->seeElement('//form/input[1]');
1991
     * $I->seeElement('input', ['name' => 'login']);
1992
     * $I->seeElement('input', ['value' => '123456']);
1993
     *
1994
     * // strict locator in first arg, attributes in second
1995
     * $I->seeElement(['css' => 'form input'], ['name' => 'login']);
1996
     * ?>
1997
     * ```
1998
     *
1999
     * @param $selector
2000
     * @param array $attributes
2001
     * @return
2002
     * Conditional Assertion: Test won't be stopped on fail
2003
     * @see \Codeception\Lib\InnerBrowser::seeElement()
2004
     */
2005
    public function canSeeElement($selector, $attributes = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $selector is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $attributes is not used and could be removed.

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

Loading history...
2006
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeElement', func_get_args()));
2007
    }
2008
    /**
2009
     * [!] Method is generated. Documentation taken from corresponding module.
2010
     *
2011
     * Checks that the given element exists on the page and is visible.
2012
     * You can also specify expected attributes of this element.
2013
     *
2014
     * ``` php
2015
     * <?php
2016
     * $I->seeElement('.error');
2017
     * $I->seeElement('//form/input[1]');
2018
     * $I->seeElement('input', ['name' => 'login']);
2019
     * $I->seeElement('input', ['value' => '123456']);
2020
     *
2021
     * // strict locator in first arg, attributes in second
2022
     * $I->seeElement(['css' => 'form input'], ['name' => 'login']);
2023
     * ?>
2024
     * ```
2025
     *
2026
     * @param $selector
2027
     * @param array $attributes
2028
     * @return
2029
     * @see \Codeception\Lib\InnerBrowser::seeElement()
2030
     */
2031
    public function seeElement($selector, $attributes = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $selector is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $attributes is not used and could be removed.

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

Loading history...
2032
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeElement', func_get_args()));
2033
    }
2034
2035
 
2036
    /**
2037
     * [!] Method is generated. Documentation taken from corresponding module.
2038
     *
2039
     * Checks that the given element is invisible or not present on the page.
2040
     * You can also specify expected attributes of this element.
2041
     *
2042
     * ``` php
2043
     * <?php
2044
     * $I->dontSeeElement('.error');
2045
     * $I->dontSeeElement('//form/input[1]');
2046
     * $I->dontSeeElement('input', ['name' => 'login']);
2047
     * $I->dontSeeElement('input', ['value' => '123456']);
2048
     * ?>
2049
     * ```
2050
     *
2051
     * @param $selector
2052
     * @param array $attributes
2053
     * Conditional Assertion: Test won't be stopped on fail
2054
     * @see \Codeception\Lib\InnerBrowser::dontSeeElement()
2055
     */
2056
    public function cantSeeElement($selector, $attributes = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $selector is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $attributes is not used and could be removed.

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

Loading history...
2057
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeElement', func_get_args()));
2058
    }
2059
    /**
2060
     * [!] Method is generated. Documentation taken from corresponding module.
2061
     *
2062
     * Checks that the given element is invisible or not present on the page.
2063
     * You can also specify expected attributes of this element.
2064
     *
2065
     * ``` php
2066
     * <?php
2067
     * $I->dontSeeElement('.error');
2068
     * $I->dontSeeElement('//form/input[1]');
2069
     * $I->dontSeeElement('input', ['name' => 'login']);
2070
     * $I->dontSeeElement('input', ['value' => '123456']);
2071
     * ?>
2072
     * ```
2073
     *
2074
     * @param $selector
2075
     * @param array $attributes
2076
     * @see \Codeception\Lib\InnerBrowser::dontSeeElement()
2077
     */
2078
    public function dontSeeElement($selector, $attributes = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $selector is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $attributes is not used and could be removed.

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

Loading history...
2079
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeElement', func_get_args()));
2080
    }
2081
2082
 
2083
    /**
2084
     * [!] Method is generated. Documentation taken from corresponding module.
2085
     *
2086
     * Checks that there are a certain number of elements matched by the given locator on the page.
2087
     *
2088
     * ``` php
2089
     * <?php
2090
     * $I->seeNumberOfElements('tr', 10);
2091
     * $I->seeNumberOfElements('tr', [0,10]); //between 0 and 10 elements
2092
     * ?>
2093
     * ```
2094
     * @param $selector
2095
     * @param mixed $expected :
2096
     * - string: strict number
2097
     * - array: range of numbers [0,10]
2098
     * Conditional Assertion: Test won't be stopped on fail
2099
     * @see \Codeception\Lib\InnerBrowser::seeNumberOfElements()
2100
     */
2101
    public function canSeeNumberOfElements($selector, $expected) {
0 ignored issues
show
Unused Code introduced by
The parameter $selector is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $expected is not used and could be removed.

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

Loading history...
2102
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeNumberOfElements', func_get_args()));
2103
    }
2104
    /**
2105
     * [!] Method is generated. Documentation taken from corresponding module.
2106
     *
2107
     * Checks that there are a certain number of elements matched by the given locator on the page.
2108
     *
2109
     * ``` php
2110
     * <?php
2111
     * $I->seeNumberOfElements('tr', 10);
2112
     * $I->seeNumberOfElements('tr', [0,10]); //between 0 and 10 elements
2113
     * ?>
2114
     * ```
2115
     * @param $selector
2116
     * @param mixed $expected :
2117
     * - string: strict number
2118
     * - array: range of numbers [0,10]
2119
     * @see \Codeception\Lib\InnerBrowser::seeNumberOfElements()
2120
     */
2121
    public function seeNumberOfElements($selector, $expected) {
0 ignored issues
show
Unused Code introduced by
The parameter $selector is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $expected is not used and could be removed.

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

Loading history...
2122
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeNumberOfElements', func_get_args()));
2123
    }
2124
2125
 
2126
    /**
2127
     * [!] Method is generated. Documentation taken from corresponding module.
2128
     *
2129
     * Checks that the given option is selected.
2130
     *
2131
     * ``` php
2132
     * <?php
2133
     * $I->seeOptionIsSelected('#form input[name=payment]', 'Visa');
2134
     * ?>
2135
     * ```
2136
     *
2137
     * @param $selector
2138
     * @param $optionText
2139
     *
2140
     * @return mixed
2141
     * Conditional Assertion: Test won't be stopped on fail
2142
     * @see \Codeception\Lib\InnerBrowser::seeOptionIsSelected()
2143
     */
2144
    public function canSeeOptionIsSelected($selector, $optionText) {
0 ignored issues
show
Unused Code introduced by
The parameter $selector is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $optionText is not used and could be removed.

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

Loading history...
2145
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeOptionIsSelected', func_get_args()));
2146
    }
2147
    /**
2148
     * [!] Method is generated. Documentation taken from corresponding module.
2149
     *
2150
     * Checks that the given option is selected.
2151
     *
2152
     * ``` php
2153
     * <?php
2154
     * $I->seeOptionIsSelected('#form input[name=payment]', 'Visa');
2155
     * ?>
2156
     * ```
2157
     *
2158
     * @param $selector
2159
     * @param $optionText
2160
     *
2161
     * @return mixed
2162
     * @see \Codeception\Lib\InnerBrowser::seeOptionIsSelected()
2163
     */
2164
    public function seeOptionIsSelected($selector, $optionText) {
0 ignored issues
show
Unused Code introduced by
The parameter $selector is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $optionText is not used and could be removed.

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

Loading history...
2165
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeOptionIsSelected', func_get_args()));
2166
    }
2167
2168
 
2169
    /**
2170
     * [!] Method is generated. Documentation taken from corresponding module.
2171
     *
2172
     * Checks that the given option is not selected.
2173
     *
2174
     * ``` php
2175
     * <?php
2176
     * $I->dontSeeOptionIsSelected('#form input[name=payment]', 'Visa');
2177
     * ?>
2178
     * ```
2179
     *
2180
     * @param $selector
2181
     * @param $optionText
2182
     *
2183
     * @return mixed
2184
     * Conditional Assertion: Test won't be stopped on fail
2185
     * @see \Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected()
2186
     */
2187
    public function cantSeeOptionIsSelected($selector, $optionText) {
0 ignored issues
show
Unused Code introduced by
The parameter $selector is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $optionText is not used and could be removed.

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

Loading history...
2188
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeOptionIsSelected', func_get_args()));
2189
    }
2190
    /**
2191
     * [!] Method is generated. Documentation taken from corresponding module.
2192
     *
2193
     * Checks that the given option is not selected.
2194
     *
2195
     * ``` php
2196
     * <?php
2197
     * $I->dontSeeOptionIsSelected('#form input[name=payment]', 'Visa');
2198
     * ?>
2199
     * ```
2200
     *
2201
     * @param $selector
2202
     * @param $optionText
2203
     *
2204
     * @return mixed
2205
     * @see \Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected()
2206
     */
2207
    public function dontSeeOptionIsSelected($selector, $optionText) {
0 ignored issues
show
Unused Code introduced by
The parameter $selector is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $optionText is not used and could be removed.

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

Loading history...
2208
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeOptionIsSelected', func_get_args()));
2209
    }
2210
2211
 
2212
    /**
2213
     * [!] Method is generated. Documentation taken from corresponding module.
2214
     *
2215
     * Asserts that current page has 404 response status code.
2216
     * Conditional Assertion: Test won't be stopped on fail
2217
     * @see \Codeception\Lib\InnerBrowser::seePageNotFound()
2218
     */
2219
    public function canSeePageNotFound() {
2220
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seePageNotFound', func_get_args()));
2221
    }
2222
    /**
2223
     * [!] Method is generated. Documentation taken from corresponding module.
2224
     *
2225
     * Asserts that current page has 404 response status code.
2226
     * @see \Codeception\Lib\InnerBrowser::seePageNotFound()
2227
     */
2228
    public function seePageNotFound() {
2229
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seePageNotFound', func_get_args()));
2230
    }
2231
2232
 
2233
    /**
2234
     * [!] Method is generated. Documentation taken from corresponding module.
2235
     *
2236
     * Checks that response code is equal to value provided.
2237
     *
2238
     * ```php
2239
     * <?php
2240
     * $I->seeResponseCodeIs(200);
2241
     *
2242
     * // recommended \Codeception\Util\HttpCode
2243
     * $I->seeResponseCodeIs(\Codeception\Util\HttpCode::OK);
2244
     * ```
2245
     *
2246
     * @param $code
2247
     * Conditional Assertion: Test won't be stopped on fail
2248
     * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIs()
2249
     */
2250
    public function canSeeResponseCodeIs($code) {
0 ignored issues
show
Unused Code introduced by
The parameter $code is not used and could be removed.

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

Loading history...
2251
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeResponseCodeIs', func_get_args()));
2252
    }
2253
    /**
2254
     * [!] Method is generated. Documentation taken from corresponding module.
2255
     *
2256
     * Checks that response code is equal to value provided.
2257
     *
2258
     * ```php
2259
     * <?php
2260
     * $I->seeResponseCodeIs(200);
2261
     *
2262
     * // recommended \Codeception\Util\HttpCode
2263
     * $I->seeResponseCodeIs(\Codeception\Util\HttpCode::OK);
2264
     * ```
2265
     *
2266
     * @param $code
2267
     * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIs()
2268
     */
2269
    public function seeResponseCodeIs($code) {
0 ignored issues
show
Unused Code introduced by
The parameter $code is not used and could be removed.

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

Loading history...
2270
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeResponseCodeIs', func_get_args()));
2271
    }
2272
2273
 
2274
    /**
2275
     * [!] Method is generated. Documentation taken from corresponding module.
2276
     *
2277
     * Checks that response code is equal to value provided.
2278
     *
2279
     * ```php
2280
     * <?php
2281
     * $I->dontSeeResponseCodeIs(200);
2282
     *
2283
     * // recommended \Codeception\Util\HttpCode
2284
     * $I->dontSeeResponseCodeIs(\Codeception\Util\HttpCode::OK);
2285
     * ```
2286
     * @param $code
2287
     * Conditional Assertion: Test won't be stopped on fail
2288
     * @see \Codeception\Lib\InnerBrowser::dontSeeResponseCodeIs()
2289
     */
2290
    public function cantSeeResponseCodeIs($code) {
0 ignored issues
show
Unused Code introduced by
The parameter $code is not used and could be removed.

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

Loading history...
2291
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeResponseCodeIs', func_get_args()));
2292
    }
2293
    /**
2294
     * [!] Method is generated. Documentation taken from corresponding module.
2295
     *
2296
     * Checks that response code is equal to value provided.
2297
     *
2298
     * ```php
2299
     * <?php
2300
     * $I->dontSeeResponseCodeIs(200);
2301
     *
2302
     * // recommended \Codeception\Util\HttpCode
2303
     * $I->dontSeeResponseCodeIs(\Codeception\Util\HttpCode::OK);
2304
     * ```
2305
     * @param $code
2306
     * @see \Codeception\Lib\InnerBrowser::dontSeeResponseCodeIs()
2307
     */
2308
    public function dontSeeResponseCodeIs($code) {
0 ignored issues
show
Unused Code introduced by
The parameter $code is not used and could be removed.

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

Loading history...
2309
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeResponseCodeIs', func_get_args()));
2310
    }
2311
2312
 
2313
    /**
2314
     * [!] Method is generated. Documentation taken from corresponding module.
2315
     *
2316
     * Checks that the page title contains the given string.
2317
     *
2318
     * ``` php
2319
     * <?php
2320
     * $I->seeInTitle('Blog - Post #1');
2321
     * ?>
2322
     * ```
2323
     *
2324
     * @param $title
2325
     *
2326
     * @return mixed
2327
     * Conditional Assertion: Test won't be stopped on fail
2328
     * @see \Codeception\Lib\InnerBrowser::seeInTitle()
2329
     */
2330
    public function canSeeInTitle($title) {
0 ignored issues
show
Unused Code introduced by
The parameter $title is not used and could be removed.

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

Loading history...
2331
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInTitle', func_get_args()));
2332
    }
2333
    /**
2334
     * [!] Method is generated. Documentation taken from corresponding module.
2335
     *
2336
     * Checks that the page title contains the given string.
2337
     *
2338
     * ``` php
2339
     * <?php
2340
     * $I->seeInTitle('Blog - Post #1');
2341
     * ?>
2342
     * ```
2343
     *
2344
     * @param $title
2345
     *
2346
     * @return mixed
2347
     * @see \Codeception\Lib\InnerBrowser::seeInTitle()
2348
     */
2349
    public function seeInTitle($title) {
0 ignored issues
show
Unused Code introduced by
The parameter $title is not used and could be removed.

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

Loading history...
2350
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInTitle', func_get_args()));
2351
    }
2352
2353
 
2354
    /**
2355
     * [!] Method is generated. Documentation taken from corresponding module.
2356
     *
2357
     * Checks that the page title does not contain the given string.
2358
     *
2359
     * @param $title
2360
     *
2361
     * @return mixed
2362
     * Conditional Assertion: Test won't be stopped on fail
2363
     * @see \Codeception\Lib\InnerBrowser::dontSeeInTitle()
2364
     */
2365
    public function cantSeeInTitle($title) {
0 ignored issues
show
Unused Code introduced by
The parameter $title is not used and could be removed.

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

Loading history...
2366
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInTitle', func_get_args()));
2367
    }
2368
    /**
2369
     * [!] Method is generated. Documentation taken from corresponding module.
2370
     *
2371
     * Checks that the page title does not contain the given string.
2372
     *
2373
     * @param $title
2374
     *
2375
     * @return mixed
2376
     * @see \Codeception\Lib\InnerBrowser::dontSeeInTitle()
2377
     */
2378
    public function dontSeeInTitle($title) {
0 ignored issues
show
Unused Code introduced by
The parameter $title is not used and could be removed.

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

Loading history...
2379
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInTitle', func_get_args()));
2380
    }
2381
2382
 
2383
    /**
2384
     * [!] Method is generated. Documentation taken from corresponding module.
2385
     *
2386
     * Switch to iframe or frame on the page.
2387
     *
2388
     * Example:
2389
     * ``` html
2390
     * <iframe name="another_frame" src="http://example.com">
2391
     * ```
2392
     *
2393
     * ``` php
2394
     * <?php
2395
     * # switch to iframe
2396
     * $I->switchToIframe("another_frame");
2397
     * ```
2398
     *
2399
     * @param string $name
2400
     * @see \Codeception\Lib\InnerBrowser::switchToIframe()
2401
     */
2402
    public function switchToIframe($name) {
0 ignored issues
show
Unused Code introduced by
The parameter $name is not used and could be removed.

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

Loading history...
2403
        return $this->getScenario()->runStep(new \Codeception\Step\Action('switchToIframe', func_get_args()));
2404
    }
2405
2406
 
2407
    /**
2408
     * [!] Method is generated. Documentation taken from corresponding module.
2409
     *
2410
     * Moves back in history.
2411
     *
2412
     * @param int $numberOfSteps (default value 1)
2413
     * @see \Codeception\Lib\InnerBrowser::moveBack()
2414
     */
2415
    public function moveBack($numberOfSteps = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $numberOfSteps is not used and could be removed.

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

Loading history...
2416
        return $this->getScenario()->runStep(new \Codeception\Step\Action('moveBack', func_get_args()));
2417
    }
2418
2419
 
2420
    /**
2421
     * [!] Method is generated. Documentation taken from corresponding module.
2422
     *
2423
     * Performs $em->flush();
2424
     * @see \Codeception\Module\Doctrine2::flushToDatabase()
2425
     */
2426
    public function flushToDatabase() {
2427
        return $this->getScenario()->runStep(new \Codeception\Step\Action('flushToDatabase', func_get_args()));
2428
    }
2429
2430
 
2431
    /**
2432
     * [!] Method is generated. Documentation taken from corresponding module.
2433
     *
2434
     * Adds entity to repository and flushes. You can redefine it's properties with the second parameter.
2435
     *
2436
     * Example:
2437
     *
2438
     * ``` php
2439
     * <?php
2440
     * $I->persistEntity(new \Entity\User, array('name' => 'Miles'));
2441
     * $I->persistEntity($user, array('name' => 'Miles'));
2442
     * ```
2443
     *
2444
     * @param $obj
2445
     * @param array $values
2446
     * @see \Codeception\Module\Doctrine2::persistEntity()
2447
     */
2448
    public function persistEntity($obj, $values = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $obj is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $values is not used and could be removed.

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

Loading history...
2449
        return $this->getScenario()->runStep(new \Codeception\Step\Action('persistEntity', func_get_args()));
2450
    }
2451
2452
 
2453
    /**
2454
     * [!] Method is generated. Documentation taken from corresponding module.
2455
     *
2456
     * Mocks the repository.
2457
     *
2458
     * With this action you can redefine any method of any repository.
2459
     * Please, note: this fake repositories will be accessible through entity manager till the end of test.
2460
     *
2461
     * Example:
2462
     *
2463
     * ``` php
2464
     * <?php
2465
     *
2466
     * $I->haveFakeRepository('Entity\User', array('findByUsername' => function($username) {  return null; }));
2467
     *
2468
     * ```
2469
     *
2470
     * This creates a stub class for Entity\User repository with redefined method findByUsername,
2471
     * which will always return the NULL value.
2472
     *
2473
     * @param $classname
2474
     * @param array $methods
2475
     * @see \Codeception\Module\Doctrine2::haveFakeRepository()
2476
     */
2477
    public function haveFakeRepository($classname, $methods = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $classname is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $methods is not used and could be removed.

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

Loading history...
2478
        return $this->getScenario()->runStep(new \Codeception\Step\Action('haveFakeRepository', func_get_args()));
2479
    }
2480
2481
 
2482
    /**
2483
     * [!] Method is generated. Documentation taken from corresponding module.
2484
     *
2485
     * Persists record into repository.
2486
     * This method crates an entity, and sets its properties directly (via reflection).
2487
     * Setters of entity won't be executed, but you can create almost any entity and save it to database.
2488
     * Returns id using `getId` of newly created entity.
2489
     *
2490
     * ```php
2491
     * $I->haveInRepository('Entity\User', array('name' => 'davert'));
2492
     * ```
2493
     * @see \Codeception\Module\Doctrine2::haveInRepository()
2494
     */
2495
    public function haveInRepository($entity, $data) {
0 ignored issues
show
Unused Code introduced by
The parameter $entity is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $data is not used and could be removed.

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

Loading history...
2496
        return $this->getScenario()->runStep(new \Codeception\Step\Action('haveInRepository', func_get_args()));
2497
    }
2498
2499
 
2500
    /**
2501
     * [!] Method is generated. Documentation taken from corresponding module.
2502
     *
2503
     * Flushes changes to database executes a query defined by array.
2504
     * It builds query based on array of parameters.
2505
     * You can use entity associations to build complex queries.
2506
     *
2507
     * Example:
2508
     *
2509
     * ``` php
2510
     * <?php
2511
     * $I->seeInRepository('User', array('name' => 'davert'));
2512
     * $I->seeInRepository('User', array('name' => 'davert', 'Company' => array('name' => 'Codegyre')));
2513
     * $I->seeInRepository('Client', array('User' => array('Company' => array('name' => 'Codegyre')));
2514
     * ?>
2515
     * ```
2516
     *
2517
     * Fails if record for given criteria can\'t be found,
2518
     *
2519
     * @param $entity
2520
     * @param array $params
2521
     * Conditional Assertion: Test won't be stopped on fail
2522
     * @see \Codeception\Module\Doctrine2::seeInRepository()
2523
     */
2524
    public function canSeeInRepository($entity, $params = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $entity is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

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

Loading history...
2525
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInRepository', func_get_args()));
2526
    }
2527
    /**
2528
     * [!] Method is generated. Documentation taken from corresponding module.
2529
     *
2530
     * Flushes changes to database executes a query defined by array.
2531
     * It builds query based on array of parameters.
2532
     * You can use entity associations to build complex queries.
2533
     *
2534
     * Example:
2535
     *
2536
     * ``` php
2537
     * <?php
2538
     * $I->seeInRepository('User', array('name' => 'davert'));
2539
     * $I->seeInRepository('User', array('name' => 'davert', 'Company' => array('name' => 'Codegyre')));
2540
     * $I->seeInRepository('Client', array('User' => array('Company' => array('name' => 'Codegyre')));
2541
     * ?>
2542
     * ```
2543
     *
2544
     * Fails if record for given criteria can\'t be found,
2545
     *
2546
     * @param $entity
2547
     * @param array $params
2548
     * @see \Codeception\Module\Doctrine2::seeInRepository()
2549
     */
2550
    public function seeInRepository($entity, $params = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $entity is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

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

Loading history...
2551
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInRepository', func_get_args()));
2552
    }
2553
2554
 
2555
    /**
2556
     * [!] Method is generated. Documentation taken from corresponding module.
2557
     *
2558
     * Flushes changes to database and performs ->findOneBy() call for current repository.
2559
     *
2560
     * @param $entity
2561
     * @param array $params
2562
     * Conditional Assertion: Test won't be stopped on fail
2563
     * @see \Codeception\Module\Doctrine2::dontSeeInRepository()
2564
     */
2565
    public function cantSeeInRepository($entity, $params = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $entity is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

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

Loading history...
2566
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInRepository', func_get_args()));
2567
    }
2568
    /**
2569
     * [!] Method is generated. Documentation taken from corresponding module.
2570
     *
2571
     * Flushes changes to database and performs ->findOneBy() call for current repository.
2572
     *
2573
     * @param $entity
2574
     * @param array $params
2575
     * @see \Codeception\Module\Doctrine2::dontSeeInRepository()
2576
     */
2577
    public function dontSeeInRepository($entity, $params = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $entity is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

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

Loading history...
2578
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInRepository', func_get_args()));
2579
    }
2580
2581
 
2582
    /**
2583
     * [!] Method is generated. Documentation taken from corresponding module.
2584
     *
2585
     * Selects field value from repository.
2586
     * It builds query based on array of parameters.
2587
     * You can use entity associations to build complex queries.
2588
     *
2589
     * Example:
2590
     *
2591
     * ``` php
2592
     * <?php
2593
     * $email = $I->grabFromRepository('User', 'email', array('name' => 'davert'));
2594
     * ?>
2595
     * ```
2596
     *
2597
     * @version 1.1
2598
     * @param $entity
2599
     * @param $field
2600
     * @param array $params
2601
     * @return array
2602
     * @see \Codeception\Module\Doctrine2::grabFromRepository()
2603
     */
2604
    public function grabFromRepository($entity, $field, $params = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $entity is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $field is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

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

Loading history...
2605
        return $this->getScenario()->runStep(new \Codeception\Step\Action('grabFromRepository', func_get_args()));
2606
    }
2607
2608
 
2609
    /**
2610
     * [!] Method is generated. Documentation taken from corresponding module.
2611
     *
2612
     * Selects entities from repository.
2613
     * It builds query based on array of parameters.
2614
     * You can use entity associations to build complex queries.
2615
     *
2616
     * Example:
2617
     *
2618
     * ``` php
2619
     * <?php
2620
     * $users = $I->grabEntitiesFromRepository('User', array('name' => 'davert'));
2621
     * ?>
2622
     * ```
2623
     *
2624
     * @version 1.1
2625
     * @param $entity
2626
     * @param array $params
2627
     * @return array
2628
     * @see \Codeception\Module\Doctrine2::grabEntitiesFromRepository()
2629
     */
2630
    public function grabEntitiesFromRepository($entity, $params = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $entity is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

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

Loading history...
2631
        return $this->getScenario()->runStep(new \Codeception\Step\Action('grabEntitiesFromRepository', func_get_args()));
2632
    }
2633
2634
 
2635
    /**
2636
     * [!] Method is generated. Documentation taken from corresponding module.
2637
     *
2638
     * Selects a single entity from repository.
2639
     * It builds query based on array of parameters.
2640
     * You can use entity associations to build complex queries.
2641
     *
2642
     * Example:
2643
     *
2644
     * ``` php
2645
     * <?php
2646
     * $user = $I->grabEntityFromRepository('User', array('id' => '1234'));
2647
     * ?>
2648
     * ```
2649
     *
2650
     * @version 1.1
2651
     * @param $entity
2652
     * @param array $params
2653
     * @return array
2654
     * @see \Codeception\Module\Doctrine2::grabEntityFromRepository()
2655
     */
2656
    public function grabEntityFromRepository($entity, $params = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $entity is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

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

Loading history...
2657
        return $this->getScenario()->runStep(new \Codeception\Step\Action('grabEntityFromRepository', func_get_args()));
2658
    }
2659
2660
 
2661
    /**
2662
     * [!] Method is generated. Documentation taken from corresponding module.
2663
     *
2664
     * Sets whether to automatically follow redirects or not
2665
     *
2666
     * @param bool $followRedirect
2667
     * @see \AppBundle\Helper\FunctionalHelper::followRedirects()
2668
     */
2669
    public function followRedirects($followRedirect = null) {
0 ignored issues
show
Unused Code introduced by
The parameter $followRedirect is not used and could be removed.

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

Loading history...
2670
        return $this->getScenario()->runStep(new \Codeception\Step\Action('followRedirects', func_get_args()));
2671
    }
2672
2673
 
2674
    /**
2675
     * [!] Method is generated. Documentation taken from corresponding module.
2676
     *
2677
     * Pretend user is logged in
2678
     *
2679
     * @param $username
2680
     * @see \AppBundle\Helper\SecurityHelper::amLoggedInAs()
2681
     */
2682
    public function amLoggedInAs($username) {
0 ignored issues
show
Unused Code introduced by
The parameter $username is not used and could be removed.

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

Loading history...
2683
        return $this->getScenario()->runStep(new \Codeception\Step\Condition('amLoggedInAs', func_get_args()));
2684
    }
2685
2686
 
2687
    /**
2688
     * [!] Method is generated. Documentation taken from corresponding module.
2689
     *
2690
     * Checks if the attributes are granted against the current authentication token
2691
     *
2692
     * @param mixed $attributes
2693
     * Conditional Assertion: Test won't be stopped on fail
2694
     * @see \AppBundle\Helper\SecurityHelper::seeIsGranted()
2695
     */
2696
    public function canSeeIsGranted($attributes) {
0 ignored issues
show
Unused Code introduced by
The parameter $attributes is not used and could be removed.

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

Loading history...
2697
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeIsGranted', func_get_args()));
2698
    }
2699
    /**
2700
     * [!] Method is generated. Documentation taken from corresponding module.
2701
     *
2702
     * Checks if the attributes are granted against the current authentication token
2703
     *
2704
     * @param mixed $attributes
2705
     * @see \AppBundle\Helper\SecurityHelper::seeIsGranted()
2706
     */
2707
    public function seeIsGranted($attributes) {
0 ignored issues
show
Unused Code introduced by
The parameter $attributes is not used and could be removed.

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

Loading history...
2708
        return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeIsGranted', func_get_args()));
2709
    }
2710
}
2711