Same name and namespace in other branches
  1. 8.9.x core/tests/Drupal/Tests/Component/Utility/VariableTest.php \Drupal\Tests\Component\Utility\VariableTest::testExport()
  2. 9 core/tests/Drupal/Tests/Component/Utility/VariableTest.php \Drupal\Tests\Component\Utility\VariableTest::testExport()

Tests exporting variables.

@dataProvider providerTestExport @covers ::export

Parameters

string $expected: The expected exported variable.

mixed $variable: The variable to be exported.

File

core/tests/Drupal/Tests/Component/Utility/VariableTest.php, line 177

Class

VariableTest
Test variable export functionality in Variable component.

Namespace

Drupal\Tests\Component\Utility

Code

public function testExport($expected, $variable) {
  $this
    ->assertEquals($expected, Variable::export($variable));
}