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

Friends don't have their own cookies in PhpBrowser #3911

Closed
insightfuls opened this Issue Jan 13, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@insightfuls
Contributor

insightfuls commented Jan 13, 2017

What are you trying to achieve?

Two users logged into a web site and one performs an action which affects the other. In very pseudo code, something like this:

$fred=$I->haveFriend();
$I->login("grace");
$fred->does(function(AcceptanceTester $I){
    $I->login("fred");
    $I->doSomething();
});
$I->seeTheConsequences();

What do you get instead?

The problem is that friends don't seem to have independent cookies. When the code gets to $I->seeTheConsequences() the main tester ($I) has hijacked Fred's session because Fred's call to $I->login("fred") has replaced the cookie from $I->login("grace").

Details

  • Codeception version: 2.2.7
  • PHP Version: 5.6
  • Operating System: Mac OS X
  • Installation type: Phar
  • List of installed packages: none via composer; don't believe it is relevant anyway
  • Suite configuration:
class_name: AcceptanceTester
modules:
    enabled:
        - \Module\PhpBrowser:
            url: http://localhost:8989/WebInterface.php

insightfuls added a commit to insightfuls/Codeception that referenced this issue Jan 13, 2017

@insightfuls

This comment has been minimized.

Show comment
Hide comment
@insightfuls

insightfuls Jan 13, 2017

Contributor

I've managed to address this with a pull request, #3912.

Contributor

insightfuls commented Jan 13, 2017

I've managed to address this with a pull request, #3912.

@insightfuls

This comment has been minimized.

Show comment
Hide comment
@insightfuls

insightfuls Jan 13, 2017

Contributor

I've discovered my pull request breaks code coverage analysis. I'm considering how I might be able to fix it.

Contributor

insightfuls commented Jan 13, 2017

I've discovered my pull request breaks code coverage analysis. I'm considering how I might be able to fix it.

insightfuls added a commit to insightfuls/Codeception that referenced this issue Jan 14, 2017

@insightfuls

This comment has been minimized.

Show comment
Hide comment
@insightfuls

insightfuls Jan 14, 2017

Contributor

I've fixed up my pull request. The problem is now tested and fixed. I considered a number of options and implemented something I thought was pretty clean, but I'm open to suggestions.

Contributor

insightfuls commented Jan 14, 2017

I've fixed up my pull request. The problem is now tested and fixed. I considered a number of options and implemented something I thought was pretty clean, but I'm open to suggestions.

@DavertMik

This comment has been minimized.

Show comment
Hide comment
@DavertMik

DavertMik Jan 16, 2017

Member

Thanks for the report and your work!

Member

DavertMik commented Jan 16, 2017

Thanks for the report and your work!

insightfuls added a commit to insightfuls/Codeception that referenced this issue Jan 17, 2017

@DavertMik DavertMik closed this in da34f97 Jan 17, 2017

chris1312 added a commit to chris1312/Codeception that referenced this issue Jun 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment