function Drupal6SqlBaseTest::testVariableGet

Same name in other branches
  1. 9 core/modules/migrate_drupal/tests/src/Unit/source/d6/Drupal6SqlBaseTest.php \Drupal\Tests\migrate_drupal\Unit\source\d6\Drupal6SqlBaseTest::testVariableGet()
  2. 10 core/modules/migrate_drupal/tests/src/Unit/source/d6/Drupal6SqlBaseTest.php \Drupal\Tests\migrate_drupal\Unit\source\d6\Drupal6SqlBaseTest::testVariableGet()
  3. 11.x core/modules/migrate_drupal/tests/src/Unit/source/d6/Drupal6SqlBaseTest.php \Drupal\Tests\migrate_drupal\Unit\source\d6\Drupal6SqlBaseTest::testVariableGet()

Tests for Drupal6SqlBase::variableGet().

File

core/modules/migrate_drupal/tests/src/Unit/source/d6/Drupal6SqlBaseTest.php, line 121

Class

Drupal6SqlBaseTest
Tests the D6 SQL base class.

Namespace

Drupal\Tests\migrate_drupal\Unit\source\d6

Code

public function testVariableGet() {
    // Test default value.
    $this->assertEquals('my_default', $this->base
        ->variableGetWrapper('non_existent_variable', 'my_default'));
    // Test non-default.
    $this->assertSame(TRUE, $this->base
        ->variableGetWrapper('my_variable', FALSE));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.