Setting a property as part of a mock

You can set properties after the mock is created with `setProperty` but it would be nice to chain this functionality when creating the mock.
`$name` must be a string.