Add tests for other types that PHP might cast

Addition to https://github.com/owncloud/core/pull/8572
Merge pull request #8586 from owncloud/more-unit-tests

Add tests for other types that PHP might cast