File tree Expand file tree Collapse file tree 5 files changed +8
-11
lines changed Expand file tree Collapse file tree 5 files changed +8
-11
lines changed Original file line number Diff line number Diff line change 30
30
"latte/latte" : " ~2.5.1" ,
31
31
"nette/application" : " ^3.0" ,
32
32
"nette/caching" : " ~2.5.8 || ^3.0" ,
33
- "ninjify/qa" : " ^0.8 .0" ,
33
+ "ninjify/qa" : " ^0.10 .0" ,
34
34
"phpstan/extension-installer" : " ^1.0" ,
35
35
"phpstan/phpstan-deprecation-rules" : " ^0.11" ,
36
36
"phpstan/phpstan-nette" : " ^0.11" ,
Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ public function doRequest($request): Response
55
55
if (!$ httpRequest instanceof HttpRequest || !$ httpResponse instanceof HttpResponse) {
56
56
throw new Exception ('Contributte\Codeception\DI\HttpExtension is not used or conflicts with another extension. ' );
57
57
}
58
+
58
59
$ httpRequest ->reset ();
59
60
$ httpResponse ->reset ();
60
61
Original file line number Diff line number Diff line change @@ -82,23 +82,15 @@ public function getMethod(): string
82
82
*/
83
83
public function getPost (?string $ key = null )
84
84
{
85
- if (func_num_args () === 0 ) {
86
- return $ this ->request ->getPost ();
87
- } else {
88
- return $ this ->request ->getPost ($ key );
89
- }
85
+ return func_num_args () === 0 ? $ this ->request ->getPost () : $ this ->request ->getPost ($ key );
90
86
}
91
87
92
88
/**
93
89
* @return mixed
94
90
*/
95
91
public function getQuery (?string $ key = null )
96
92
{
97
- if (func_num_args () === 0 ) {
98
- return $ this ->request ->getQuery ();
99
- } else {
100
- return $ this ->request ->getQuery ($ key );
101
- }
93
+ return func_num_args () === 0 ? $ this ->request ->getQuery () : $ this ->request ->getQuery ($ key );
102
94
}
103
95
104
96
public function getRawBody (): ?string
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ public function seeRedirectTo(string $url): void
68
68
if ($ this ->client ->isFollowingRedirects ()) {
69
69
$ this ->fail ('Method seeRedirectTo only works when followRedirects option is disabled ' );
70
70
}
71
+
71
72
/** @var NetteDIModule $diModule */
72
73
$ diModule = $ this ->getModule (NetteDIModule::class);
73
74
$ request = $ diModule ->grabService (IRequest::class);
Original file line number Diff line number Diff line change @@ -84,9 +84,11 @@ public function useConfigFiles(array $configFiles): void
84
84
if ($ this ->config ['newContainerForEachTest ' ] !== true ) {
85
85
$ this ->fail ('The useConfigFiles can only be used if the newContainerForEachTest option is set to true. ' );
86
86
}
87
+
87
88
if ($ this ->container !== null ) {
88
89
$ this ->fail ('Can \'t set configFiles after the container is created. ' );
89
90
}
91
+
90
92
$ this ->configFiles = $ configFiles ;
91
93
}
92
94
@@ -158,6 +160,7 @@ private function clearTempDir(): void
158
160
if (is_dir ($ tempDir )) {
159
161
FileSystem::delete (realpath ($ tempDir ));
160
162
}
163
+
161
164
FileSystem::createDir ($ tempDir );
162
165
}
163
166
You can’t perform that action at this time.
0 commit comments