The Wayback Machine - https://web.archive.org/web/20200907104224/https://github.com/symfony/panther/issues/115
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Routing base on hostname #115

Open
grachevko opened this issue Oct 5, 2018 · 2 comments
Open

Routing base on hostname #115

grachevko opened this issue Oct 5, 2018 · 2 comments

Comments

@grachevko
Copy link

@grachevko grachevko commented Oct 5, 2018

My project have routing based on hosts. But web driver make request to http://127.0.0.1:9080.
How can i change host?

@dunglas
Copy link
Member

@dunglas dunglas commented Oct 8, 2018

You can pass the hostname option to the $options parameter of PantherTestCase:startWebServer().

Btw, it would be great to document available options: https://github.com/symfony/panther/blob/master/src/PantherTestCaseTrait.php#L105-L108

Easy Hacktoberfest PR :)

@grachevko
Copy link
Author

@grachevko grachevko commented Oct 9, 2018

@dunglas yeah it work, but how to forward this host to local ip?
I do this for now, but i want something more convinient

        $hostname = $options['hostname'] ?? null;
        if (null !== $hostname) {
            exec(sprintf('echo 127.0.0.1 %s >> /etc/hosts', $hostname));
        }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.