function VariableTest::testVariableDefaults

Makes sure that the default variable parameter is passed through okay.

File

drupal/core/modules/system/lib/Drupal/system/Tests/Bootstrap/VariableTest.php, line 55
Definition of Drupal\system\Tests\Bootstrap\VariableTest.

Class

VariableTest
Tests variable system functions.

Namespace

Drupal\system\Tests\Bootstrap

Code

function testVariableDefaults() {

  // Tests passing nothing through to the default.
  $this
    ->assertIdentical(NULL, variable_get('simpletest_bootstrap_variable_test'), 'Variables are correctly defaulting to NULL.');

  // Tests passing 5 to the default parameter.
  $this
    ->assertIdentical(5, variable_get('simpletest_bootstrap_variable_test', 5), 'The default variable parameter is passed through correctly.');
}