/**
  * Create an authenticated user and log in as that user.
  */
 public static function setupBeforeClass()
 {
     self::$options = array('required_fields_only' => FALSE);
     User::logout();
     $userObject = User::createRandom()->verify(get_class());
     self::$userObject = User::login($userObject->getNameValues(), $userObject->getPasswordValues())->verify(get_class());
 }
 /**
  * Create an authenticated user and log in as that user. Create an article.
  */
 public static function setupBeforeClass()
 {
     $userObject = User::loginProgrammatically(1)->verify(get_class());
     self::$articleObject = Article::createRandom()->verify(get_class());
     $userObject->logout();
     $userObject = User::createRandom()->verify(get_class());
     $userObject = User::login($userObject->getNameValues(), $userObject->getPasswordValues())->verify(get_class());
 }
 /**
  * Create an authenticated user and log in as that user.
  */
 public static function setUpBeforeClass()
 {
     $userObject = User::createRandom()->verify(get_class());
     $userObject = User::login($userObject->getNameValues(), $userObject->getPasswordValues())->verify(get_class());
 }