You could use the Firefox add-on User Agent Overrider. With this add-on you can use whatever user agent you want, for examlpe:
Firefox 28/Android: Mozilla/5.0 (Android; Mobile; rv:28.0) Gecko/24.0 Firefox/28.0
If your website detects mobile devices through the user agent then you can test your layout this way.
Update Nov '17:
Due to the release of Firefox 57 and the introduction of web extension this add-on sadly is no longer available. Alternatively you can edit the Firefox preference general.useragent.override
in your configuration:
about:config
general.useragent.override