Add tests for other types that PHP might cast

Addition to https://github.com/owncloud/core/pull/8572