Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Isolate session on disk between test cases #46

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

PowerKiKi
Copy link
Contributor

This prevent side-effects between test cases via session that might
or might not pre-exist on disk.

As discussed in #44 (comment). Once that other PR is merged, I'll rebase this one to remove that time() usage that won't be necessary anymore.

Do test improvements also require a CHANGELOG entry ?

Provide a narrative description of what you are trying to accomplish:

  • Are you fixing a bug?

    • Detail how the bug is invoked currently.
    • Detail the original, incorrect behavior.
    • Detail the new, expected behavior.
    • Base your feature on the master branch, and submit against that branch.
    • Add a regression test that demonstrates the bug, and proves the fix.
    • Add a CHANGELOG.md entry for the fix.
  • Are you creating a new feature?

    • Why is the new feature needed? What purpose does it serve?
    • How will users use the new feature?
    • Base your feature on the develop branch, and submit against that branch.
    • Add only one feature per pull request; split multiple features over multiple pull requests
    • Add tests for the new feature.
    • Add documentation for the new feature.
    • Add a CHANGELOG.md entry for the new feature.
  • Is this related to quality assurance?

  • Is this related to documentation?

This prevent side-effects between test cases via session that might
or might not pre-exist on disk.
Copy link
Member

@weierophinney weierophinney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've rebased for you; pull and update your local checkout.

I've indicated one change we need, which you'll see in comments below.

You also mentioned removing some time() usage, but I wasn't exactly sure which, so I'll have you go ahead and complete this before I merge.

As this is a QA improvement, we can merge at any time. I have some pending updates that need to be released, so I'll go ahead and do those; ping me when the tests are ready to merge.

Thanks!

mkdir($this->sessionSavePath);
}

// remove old session test files if any
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should happen in tearDown(), to ensure we leave things clean on completion.

@PowerKiKi
Copy link
Contributor Author

@weierophinney, I fixed what you suggested, and removed the time() thing I was talking about. I made a separate commit so it's easier to review. But I'll squash everything if you let me know.

@weierophinney
Copy link
Member

This repository has been closed and moved to mezzio/mezzio-session-ext; a new issue has been opened at mezzio/mezzio-session-ext#2.

@weierophinney
Copy link
Member

This repository has been moved to mezzio/mezzio-session-ext. If you feel that this patch is still relevant, please re-open against that repository, and reference this issue. To re-open, we suggest the following workflow:

  • Squash all commits in your branch (git rebase -i origin/{branch})
  • Make a note of all changed files (`git diff --name-only origin/{branch}...HEAD
  • Run the laminas/laminas-migration tool on the code.
  • Clone mezzio/mezzio-session-ext to another directory.
  • Copy the files from the second bullet point to the clone of mezzio/mezzio-session-ext.
  • In your clone of mezzio/mezzio-session-ext, commit the files, push to your fork, and open the new PR.
    We will be providing tooling via laminas/laminas-migration soon to help automate the process.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants