Added mink tests
Added phpunit tests
Minor bugfix with headers and content encoding