diff --git a/core/tests/Drupal/Tests/Component/Utility/VariableTest.php b/core/tests/Drupal/Tests/Component/Utility/VariableTest.php
new file mode 100644
index 0000000..d74df64
--- /dev/null
+++ b/core/tests/Drupal/Tests/Component/Utility/VariableTest.php
@@ -0,0 +1,126 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Tests\Component\Utility\VariableTest.
+ */
+
+namespace Drupal\Tests\Component\Utility;
+
+use Drupal\Tests\UnitTestCase;
+use Drupal\Component\Utility\Variable;
+
+/**
+ * Test variable export functionality in Variable component.
+ *
+ * @see \Drupal\Component\Utility\Variable
+ *
+ * @group Drupal
+ * @group Component
+ * @group Variable
+ *
+ * @coversDefaultClass \Drupal\Component\Utility\Export
+ */
+class VariableTest extends UnitTestCase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function getInfo() {
+    return array(
+      'name' => 'Variable utilities',
+      'description' => 'Unit test for Variable::export().',
+      'group' => 'System',
+    );
+  }
+
+  /**
+   * Data provider for testExport().
+   *
+   * @return array
+   *   An array containing:
+   *     - The expected export string.
+   *     - The variable to export.
+   */
+  public function providerTestExport() {
+    $object_mock = $this->getMock('stdClass');
+    $object_expected = get_class($object_mock) . "::__set_state(array(\n   '__phpunit_invocationMocker' => NULL,\n))";
+    return array(
+      // Array.
+      array(
+        'array()',
+        array(),
+      ),
+      array(
+        // non-associative.
+        "array(\n  1,\n  2,\n  3,\n  4,\n)",
+        array(1,2,3,4),
+      ),
+      array(
+        // associative.
+        "array(\n  'a' => 1,\n)",
+        array('a' => 1),
+      ),
+      // Bool.
+      array(
+        'TRUE',
+        TRUE,
+      ),
+      array(
+        'FALSE',
+        FALSE,
+      ),
+      // Strings.
+      array(
+        "'string'",
+        'string',
+      ),
+      array(
+        '"\n\r\t"',
+        "\n\r\t",
+      ),
+      array(
+        // 2 backslashes. \\
+        "'\\'",
+        '\\',
+      ),
+      array(
+        // Double-quote "
+        "'\"'",
+        "\"",
+      ),
+      array(
+        // Single-quote '
+        '"\'"',
+        "'",
+      ),
+      // Object.
+      array(
+        // A stdClass object.
+        '(object) array()',
+        new \stdClass(),
+      ),
+      array(
+        // A not-stdClass object.
+        $object_expected,
+        $object_mock,
+      ),
+    );
+  }
+
+  /**
+   * Tests Variable::export().
+   *
+   * @dataProvider providerTestExport
+   * @covers ::export
+   *
+   * @param string $expected
+   *   The expected exported variable.
+   * @param mixed $variable
+   *   The variable to be exported.
+   */
+  public function testExport($expected, $variable) {
+    $this->assertEquals($expected, Variable::export($variable));
+  }
+
+}
