You are here

public function Drupal6SqlBaseTest::testVariableGet in Drupal 9

Same name and namespace in other branches
  1. 8 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
Contains \Drupal\Tests\migrate_drupal\Unit\source\d6\Drupal6SqlBaseTest.

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
    ->assertTrue($this->base
    ->variableGetWrapper('my_variable', FALSE));
}