tedivm/Fetch — pull request #17 by patkar (2013-07-10 22:21:02+00:00)
Title: Fix behavior on Server::setFlag()

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