Update docs to include examples and api-doc
Add a bit more info to docs and add tests for toArray
Use stricter PHPUnit assertions

All array comparisons now use assertSame() to guarantee correct order.