function VariableTest::testExport

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Component/Utility/VariableTest.php \Drupal\Tests\Component\Utility\VariableTest::testExport()
  2. 8.9.x core/tests/Drupal/Tests/Component/Utility/VariableTest.php \Drupal\Tests\Component\Utility\VariableTest::testExport()
  3. 11.x 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) : void {
    $this->assertEquals($expected, Variable::export($variable));
}

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