File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 11
11
namespace Codeception \Module ;
12
12
13
13
use Codeception \Module ;
14
+ use Symfony \Component \BrowserKit \Client ;
15
+ use Symfony \Component \BrowserKit \Response ;
14
16
15
17
/**
16
- * Class Redirects
18
+ * Redirects module for Codeception.
17
19
*
18
20
* @package Codeception\Module
19
21
* @author Gary Jones
@@ -69,6 +71,7 @@ public function seePermanentRedirectToHttpFor($url)
69
71
*/
70
72
public function seePermanentRedirectTo ($ url )
71
73
{
74
+ /** @var Response $response */
72
75
$ response = $ this ->getModule ('PhpBrowser ' )->client ->getInternalResponse ();
73
76
$ responseCode = $ response ->getStatus ();
74
77
$ locationHeader = $ response ->getHeader ('Location ' , true );
@@ -103,8 +106,12 @@ public function seePermanentRedirectToHttpsFor($url)
103
106
protected function permanentRedirectForProtocol ($ url , $ protocol )
104
107
{
105
108
$ url = ltrim ($ url , '/ ' );
106
- $ this ->getModule ('REST ' )->sendHead ($ url );
107
109
110
+ /** @var REST $rest */
111
+ $ rest = $ this ->getModule ('REST ' );
112
+ $ rest ->sendHEAD ($ url );
113
+
114
+ /** @var Client $client */
108
115
$ client = $ this ->getModule ('PhpBrowser ' )->client ;
109
116
$ responseCode = $ client ->getInternalResponse ()->getStatus ();
110
117
$ responseUri = $ client ->getHistory ()->current ()->getUri ();
You can’t perform that action at this time.
0 commit comments