Skip to content

Commit ff5cd9c

Browse files
committed
Add NetteApplicationModule::followRedirects method
1 parent a98c30e commit ff5cd9c

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/Module/NetteApplicationModule.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,20 @@ public function _after(TestInterface $test)
5858
$_COOKIE = [];
5959
}
6060

61+
/**
62+
* @param bool $followRedirects
63+
*/
64+
public function followRedirects($followRedirects)
65+
{
66+
$this->client->followRedirects($followRedirects);
67+
}
68+
69+
/**
70+
* @param string $url
71+
*/
6172
public function seeRedirectTo($url)
6273
{
63-
if ($this->config['followRedirects']) {
74+
if ($this->client->isFollowingRedirects()) {
6475
$this->fail('Method seeRedirectTo only works when followRedirects option is disabled');
6576
}
6677
$request = $this->getModule(NetteDIModule::class)->grabService(IRequest::class);

0 commit comments

Comments
 (0)