You are here

public function jDrupalConnectTest::testAuthenticatedConnect in jDrupal 8

Same name in this branch
  1. 8 src/Tests/jDrupalConnectTest.php \Drupal\jdrupal\Tests\jDrupalConnectTest::testAuthenticatedConnect()
  2. 8 tests/src/Unit/JDrupalConnectTest.php \Drupal\jdrupal\Tests\jDrupalConnectTest::testAuthenticatedConnect()

Test authenticated connection.

File

src/Tests/jDrupalConnectTest.php, line 40
jDrupal Connect tests.

Class

jDrupalConnectTest
Tests the jDrupal Connect resource.

Namespace

Drupal\jdrupal\Tests

Code

public function testAuthenticatedConnect() {

  // Create a user.
  $test_user = $this
    ->drupalCreateUser(array(
    'access content',
  ));

  // Log them in.
  $this
    ->drupalLogin($test_user);

  // Check that our module did it's thing.
  $this
    ->assertText(t('The test module did its thing.'), "Found evidence of test module.");
}