Issues (1237)

Security Analysis    not enabled

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

tests/functional/FunctionalTester.php (2 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php //[STAMP] fa259e6277a310881c0cdeb89563ce4c
2
3
// This class was automatically generated by build task
4
// You should not change it manually as it will be overwritten on next build
5
// @codingStandardsIgnoreFile
6
7
8
use Codeception\Module\Filesystem;
9
use Codeception\Module\FunctionalHelper;
10
11
/**
12
 * Inherited Methods
13
 * @method void wantToTest($text)
14
 * @method void wantTo($text)
15
 * @method void execute($callable)
16
 * @method void expectTo($prediction)
17
 * @method void expect($prediction)
18
 * @method void amGoingTo($argumentation)
19
 * @method void am($role)
20
 * @method void lookForwardTo($achieveValue)
21
 * @method void comment($description)
22
 * @method void haveFriend($name, $actorClass = null)
23
 *
24
 * @SuppressWarnings(PHPMD)
25
*/
26
class FunctionalTester extends \Codeception\Actor
0 ignored issues
show
Comprehensibility Best Practice introduced by
The type FunctionalTester has been defined more than once; this definition is ignored, only the first definition in tests/_support/FunctionalTester.php (L19-26) is considered.

This check looks for classes that have been defined more than once.

If you can, we would recommend to use standard object-oriented programming techniques. For example, to avoid multiple types, it might make sense to create a common interface, and then multiple, different implementations for that interface.

This also has the side-effect of providing you with better IDE auto-completion, static analysis and also better OPCode caching from PHP.

Loading history...
There is one abstract method getScenario in this class; you could implement it, or declare this class as abstract.
Loading history...
27
{
28
   
29
    /**
30
     * [!] Method is generated. Documentation taken from corresponding module.
31
     *
32
     * Enters a directory In local filesystem.
33
     * Project root directory is used by default
34
     *
35
     * @param $path
36
     * @see \Codeception\Module\Filesystem::amInPath()
37
     */
38
    public function amInPath($path) {
39
        return $this->scenario->runStep(new \Codeception\Step\Condition('amInPath', func_get_args()));
40
    }
41
42
 
43
    /**
44
     * [!] Method is generated. Documentation taken from corresponding module.
45
     *
46
     * Opens a file and stores it's content.
47
     *
48
     * Usage:
49
     *
50
     * ``` php
51
     * <?php
52
     * $I->openFile('composer.json');
53
     * $I->seeInThisFile('codeception/codeception');
54
     * ?>
55
     * ```
56
     *
57
     * @param $filename
58
     * @see \Codeception\Module\Filesystem::openFile()
59
     */
60
    public function openFile($filename) {
61
        return $this->scenario->runStep(new \Codeception\Step\Action('openFile', func_get_args()));
62
    }
63
64
 
65
    /**
66
     * [!] Method is generated. Documentation taken from corresponding module.
67
     *
68
     * Deletes a file
69
     *
70
     * ``` php
71
     * <?php
72
     * $I->deleteFile('composer.lock');
73
     * ?>
74
     * ```
75
     *
76
     * @param $filename
77
     * @see \Codeception\Module\Filesystem::deleteFile()
78
     */
79
    public function deleteFile($filename) {
80
        return $this->scenario->runStep(new \Codeception\Step\Action('deleteFile', func_get_args()));
81
    }
82
83
 
84
    /**
85
     * [!] Method is generated. Documentation taken from corresponding module.
86
     *
87
     * Deletes directory with all subdirectories
88
     *
89
     * ``` php
90
     * <?php
91
     * $I->deleteDir('vendor');
92
     * ?>
93
     * ```
94
     *
95
     * @param $dirname
96
     * @see \Codeception\Module\Filesystem::deleteDir()
97
     */
98
    public function deleteDir($dirname) {
99
        return $this->scenario->runStep(new \Codeception\Step\Action('deleteDir', func_get_args()));
100
    }
101
102
 
103
    /**
104
     * [!] Method is generated. Documentation taken from corresponding module.
105
     *
106
     * Copies directory with all contents
107
     *
108
     * ``` php
109
     * <?php
110
     * $I->copyDir('vendor','old_vendor');
111
     * ?>
112
     * ```
113
     *
114
     * @param $src
115
     * @param $dst
116
     * @see \Codeception\Module\Filesystem::copyDir()
117
     */
118
    public function copyDir($src, $dst) {
119
        return $this->scenario->runStep(new \Codeception\Step\Action('copyDir', func_get_args()));
120
    }
121
122
 
123
    /**
124
     * [!] Method is generated. Documentation taken from corresponding module.
125
     *
126
     * Checks If opened file has `text` in it.
127
     *
128
     * Usage:
129
     *
130
     * ``` php
131
     * <?php
132
     * $I->openFile('composer.json');
133
     * $I->seeInThisFile('codeception/codeception');
134
     * ?>
135
     * ```
136
     *
137
     * @param $text
138
     * Conditional Assertion: Test won't be stopped on fail
139
     * @see \Codeception\Module\Filesystem::seeInThisFile()
140
     */
141
    public function canSeeInThisFile($text) {
142
        return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInThisFile', func_get_args()));
143
    }
144
    /**
145
     * [!] Method is generated. Documentation taken from corresponding module.
146
     *
147
     * Checks If opened file has `text` in it.
148
     *
149
     * Usage:
150
     *
151
     * ``` php
152
     * <?php
153
     * $I->openFile('composer.json');
154
     * $I->seeInThisFile('codeception/codeception');
155
     * ?>
156
     * ```
157
     *
158
     * @param $text
159
     * @see \Codeception\Module\Filesystem::seeInThisFile()
160
     */
161
    public function seeInThisFile($text) {
162
        return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInThisFile', func_get_args()));
163
    }
164
165
 
166
    /**
167
     * [!] Method is generated. Documentation taken from corresponding module.
168
     *
169
     * Checks the strict matching of file contents.
170
     * Unlike `seeInThisFile` will fail if file has something more than expected lines.
171
     * Better to use with HEREDOC strings.
172
     * Matching is done after removing "\r" chars from file content.
173
     *
174
     * ``` php
175
     * <?php
176
     * $I->openFile('process.pid');
177
     * $I->seeFileContentsEqual('3192');
178
     * ?>
179
     * ```
180
     *
181
     * @param $text
182
     * Conditional Assertion: Test won't be stopped on fail
183
     * @see \Codeception\Module\Filesystem::seeFileContentsEqual()
184
     */
185
    public function canSeeFileContentsEqual($text) {
186
        return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeFileContentsEqual', func_get_args()));
187
    }
188
    /**
189
     * [!] Method is generated. Documentation taken from corresponding module.
190
     *
191
     * Checks the strict matching of file contents.
192
     * Unlike `seeInThisFile` will fail if file has something more than expected lines.
193
     * Better to use with HEREDOC strings.
194
     * Matching is done after removing "\r" chars from file content.
195
     *
196
     * ``` php
197
     * <?php
198
     * $I->openFile('process.pid');
199
     * $I->seeFileContentsEqual('3192');
200
     * ?>
201
     * ```
202
     *
203
     * @param $text
204
     * @see \Codeception\Module\Filesystem::seeFileContentsEqual()
205
     */
206
    public function seeFileContentsEqual($text) {
207
        return $this->scenario->runStep(new \Codeception\Step\Assertion('seeFileContentsEqual', func_get_args()));
208
    }
209
210
 
211
    /**
212
     * [!] Method is generated. Documentation taken from corresponding module.
213
     *
214
     * Checks If opened file doesn't contain `text` in it
215
     *
216
     * ``` php
217
     * <?php
218
     * $I->openFile('composer.json');
219
     * $I->dontSeeInThisFile('codeception/codeception');
220
     * ?>
221
     * ```
222
     *
223
     * @param $text
224
     * Conditional Assertion: Test won't be stopped on fail
225
     * @see \Codeception\Module\Filesystem::dontSeeInThisFile()
226
     */
227
    public function cantSeeInThisFile($text) {
228
        return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInThisFile', func_get_args()));
229
    }
230
    /**
231
     * [!] Method is generated. Documentation taken from corresponding module.
232
     *
233
     * Checks If opened file doesn't contain `text` in it
234
     *
235
     * ``` php
236
     * <?php
237
     * $I->openFile('composer.json');
238
     * $I->dontSeeInThisFile('codeception/codeception');
239
     * ?>
240
     * ```
241
     *
242
     * @param $text
243
     * @see \Codeception\Module\Filesystem::dontSeeInThisFile()
244
     */
245
    public function dontSeeInThisFile($text) {
246
        return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeInThisFile', func_get_args()));
247
    }
248
249
 
250
    /**
251
     * [!] Method is generated. Documentation taken from corresponding module.
252
     *
253
     * Deletes a file
254
     * @see \Codeception\Module\Filesystem::deleteThisFile()
255
     */
256
    public function deleteThisFile() {
257
        return $this->scenario->runStep(new \Codeception\Step\Action('deleteThisFile', func_get_args()));
258
    }
259
260
 
261
    /**
262
     * [!] Method is generated. Documentation taken from corresponding module.
263
     *
264
     * Checks if file exists in path.
265
     * Opens a file when it's exists
266
     *
267
     * ``` php
268
     * <?php
269
     * $I->seeFileFound('UserModel.php','app/models');
270
     * ?>
271
     * ```
272
     *
273
     * @param $filename
274
     * @param string $path
275
     * Conditional Assertion: Test won't be stopped on fail
276
     * @see \Codeception\Module\Filesystem::seeFileFound()
277
     */
278
    public function canSeeFileFound($filename, $path = null) {
279
        return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeFileFound', func_get_args()));
280
    }
281
    /**
282
     * [!] Method is generated. Documentation taken from corresponding module.
283
     *
284
     * Checks if file exists in path.
285
     * Opens a file when it's exists
286
     *
287
     * ``` php
288
     * <?php
289
     * $I->seeFileFound('UserModel.php','app/models');
290
     * ?>
291
     * ```
292
     *
293
     * @param $filename
294
     * @param string $path
295
     * @see \Codeception\Module\Filesystem::seeFileFound()
296
     */
297
    public function seeFileFound($filename, $path = null) {
298
        return $this->scenario->runStep(new \Codeception\Step\Assertion('seeFileFound', func_get_args()));
299
    }
300
301
 
302
    /**
303
     * [!] Method is generated. Documentation taken from corresponding module.
304
     *
305
     * Checks if file does not exists in path
306
     *
307
     * @param $filename
308
     * @param string $path
309
     * Conditional Assertion: Test won't be stopped on fail
310
     * @see \Codeception\Module\Filesystem::dontSeeFileFound()
311
     */
312
    public function cantSeeFileFound($filename, $path = null) {
313
        return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeFileFound', func_get_args()));
314
    }
315
    /**
316
     * [!] Method is generated. Documentation taken from corresponding module.
317
     *
318
     * Checks if file does not exists in path
319
     *
320
     * @param $filename
321
     * @param string $path
322
     * @see \Codeception\Module\Filesystem::dontSeeFileFound()
323
     */
324
    public function dontSeeFileFound($filename, $path = null) {
325
        return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeFileFound', func_get_args()));
326
    }
327
328
 
329
    /**
330
     * [!] Method is generated. Documentation taken from corresponding module.
331
     *
332
     * Erases directory contents
333
     *
334
     * ``` php
335
     * <?php
336
     * $I->cleanDir('logs');
337
     * ?>
338
     * ```
339
     *
340
     * @param $dirname
341
     * @see \Codeception\Module\Filesystem::cleanDir()
342
     */
343
    public function cleanDir($dirname) {
344
        return $this->scenario->runStep(new \Codeception\Step\Action('cleanDir', func_get_args()));
345
    }
346
347
 
348
    /**
349
     * [!] Method is generated. Documentation taken from corresponding module.
350
     *
351
     * Saves contents to file
352
     *
353
     * @param $filename
354
     * @param $contents
355
     * @see \Codeception\Module\Filesystem::writeToFile()
356
     */
357
    public function writeToFile($filename, $contents) {
358
        return $this->scenario->runStep(new \Codeception\Step\Action('writeToFile', func_get_args()));
359
    }
360
}
361