core_oauth.test in Twitter 6.3
Functional tests for the twitter module using OAuth.
File
tests/core_oauth.testView source
<?php
/**
 * @file
 * Functional tests for the twitter module using OAuth.
 */
class TwitterOAuthTest extends DrupalWebTestCase {
  /*
   * The getInfo() method provides information about the test.
   * In order for the test to be run, the getInfo() method needs
   * to be implemented.
   */
  public static function getInfo() {
    return array(
      'name' => t('Twitter core with OAuth'),
      'description' => t('Tests main module functionality using OAuth.'),
      'group' => t('Twitter'),
    );
  }
  /**
   * Prepares the testing environment
   */
  function setUp() {
    parent::setUp('autoload', 'twitter', 'views', 'oauth_common', 'twitter_mock');
  }
  /**
   * Tests account addition process
   */
  public function testAccountAddition() {
    // Create user
    $this->user = $this
      ->drupalCreateUser(array(
      'add twitter accounts',
      'import own tweets',
    ));
    $this
      ->drupalLogin($this->user);
    $result = $this
      ->drupalGet(twitter_mock_url('test'));
    debug($result);
    // Add a Twitter account
    // Load tweets
    // Delete the Twitter account
  }
}Classes
| 
            Name | 
                  Description | 
|---|---|
| TwitterOAuthTest | @file Functional tests for the twitter module using OAuth. |