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

Fix behavior on Server::setFlag() #17

Merged
merged 2 commits into from Jul 12, 2013
Merged

Fix behavior on Server::setFlag() #17

merged 2 commits into from Jul 12, 2013

Conversation

QuingKhaos
Copy link
Contributor

This PR fixes problems with the setFlag() method. Primary it was not possible to remove flags or set exclusive flag with automatic remove of the concurrent flag.

Now the method has the following characteristics:

  • flags can be removed
  • same flag is not added twice or more
  • adding exclusive flags and removing the concurrent one works
  • adding the same flag with another value replaces the old value

I also added a unit test to test it with different setFlag() calls. Should result in OK.

phpunit tests/Fetch/Test/ServerTest.php

tedivm added a commit that referenced this pull request Jul 12, 2013
Fix behavior on Server::setFlag()
@tedivm tedivm merged commit 12f147b into tedious:master Jul 12, 2013
@QuingKhaos QuingKhaos deleted the fix/flags branch July 12, 2013 00:54
@QuingKhaos QuingKhaos mentioned this pull request Jul 12, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants