public function testUserCreationWithOptions()
{
$kernel = $this->createKernel();
$command = new CreateUserCommand();
$application = new Application($kernel);
$application->setAutoExit(false);
$tester = new ApplicationTester($application);
$username = 'test_username';
$password = 'test_password';
$email = '[email protected]';
$tester->run(array('command' => $command->getFullName(), 'username' => $username, 'password' => $password, 'email' => $email, '--inactive' => true, '--super-admin' => true), array('interactive' => false, 'decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE));
$userManager = $this->getService('fos_user.user_manager');
$user = $userManager->findUserByUsername($username);
$this->assertTrue($user instanceof User);
$this->assertEquals($email, $user->getEmail());
$this->assertFalse($user->isEnabled());
$this->assertTrue($user->hasRole('ROLE_SUPERADMIN'));
$userManager->deleteUser($user);
}