title: Creating a fake user in Symfony2 for testing purposes
body: <p>I'm somewhat new to testing in PHP. I've done quite a bit of testing on Rails using Cucumber, RSpec, Capybara and Factory Girl, but I've barely done any testing with PHP.</p>
  
  <p>I'll ask a question about my current challenge in the most general way possible, since I've gone down a few specific paths and been met only with frustration.</p>
  
  <p><strong>I want to write a functional test for signing a user in. What's a good way to create the test user object that I would need in order to try to sign in?</strong></p>
  
  <p>Even more generally, what's the de facto standard for creating test objects in Symfony2? Fixtures? Some kind of factory?</p>
  
  <p>In Ruby, I would use Factory Girl, since it lets you handle any object's dependencies in a clean, DRY way. There seems to be a Factory Girl equivalent in PHP in Phactory, but unfortunately it seems that that tool is not widely used and no longer maintained.</p>