diff --git a/core/lib/Drupal/Core/TypedData/AllowedValuesInterface.php b/core/lib/Drupal/Core/TypedData/AllowedValuesInterface.php
index cfdbc73..b912975 100644
--- a/core/lib/Drupal/Core/TypedData/AllowedValuesInterface.php
+++ b/core/lib/Drupal/Core/TypedData/AllowedValuesInterface.php
@@ -14,50 +14,54 @@
   /**
    * Returns a list of all available values.
    *
+   * @param object $user
+   *   The user to use as context.
+   *
    * @return array
-   *   The array of available values.
+   *   The list of available values.
    */
-  public function getAvailableValues(\Drupal\user\Plugin\Core\Entity\User $user = NULL);
+  public function getAvailableValues($user = NULL);
 
   /**
    * Returns a list of all available values an their labels.
    *
    * This is similar to hook_options_list().
-   * @see hook_options_list()
+   *
+   * @param object $user
+   *   The user to use as context.
    *
    * @return array
-   *   The array of  valid values. Array keys are the values to be stored, and
-   *   should be of the data type (string, number...) expected by the first
-   *   'column' for the field type. Array values are the labels to display
-   *   within the option list.
+   *   The array of  valid values. Array keys are the values to be stored, array
+   *   values are the labels to display within the option list.
+   *
+   * @see hook_options_list()
    */
-  public function getAvailableOptions(\Drupal\user\Plugin\Core\Entity\User $user = NULL);
+  public function getAvailableOptions($user = NULL);
 
   /**
    * Returns a list of the allowed values in the current context.
    *
-   * @param \Drupal\user\Plugin\Core\Entity\User $user
+   * @param object $user
    *   The user to use as context.
    *
    * @return array
-   *   The array of allowed values.
+   *   The list of allowed values.
    */
-  public function getAllowedValues(\Drupal\user\Plugin\Core\Entity\User $user = NULL);
+  public function getAllowedValues($user = NULL);
 
   /**
    * Returns a list of valid values an their labels.
    *
    * This is similar to hook_options_list().
-   * @see hook_options_list()
    *
-   * @param \Drupal\user\Plugin\Core\Entity\User $user
+   * @param object $user
    *   The user to use as context.
    *
    * @return array
-   *   The array of  valid values. Array keys are the values to be stored, and
-   *   should be of the data type (string, number...) expected by the first
-   *   'column' for the field type. Array values are the labels to display
-   *   within the option list.
+   *   The array of  valid values. Array keys are the values to be stored, array
+   *   values are the labels to display within the option list.
+   *
+   * @see hook_options_list()
    */
-  public function getAllowedOptions(\Drupal\user\Plugin\Core\Entity\User $user = NULL);
+  public function getAllowedOptions($user = NULL);
 }
diff --git a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/AllowedValuesConstraint.php b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/AllowedValuesConstraint.php
index 1c5c067..f4099db 100644
--- a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/AllowedValuesConstraint.php
+++ b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/AllowedValuesConstraint.php
@@ -17,7 +17,7 @@
  *
  * @Plugin(
  *   id = "AllowedValues",
- *   label = @Translation("AllowedValues", context = "Validation"),
+ *   label = @Translation("AllowedValues", context = "Validation")
  * )
  */
 class AllowedValuesConstraint extends Choice {
diff --git a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/AllowedValuesConstraintValidator.php b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/AllowedValuesConstraintValidator.php
index f0afd04..6514966 100644
--- a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/AllowedValuesConstraintValidator.php
+++ b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/AllowedValuesConstraintValidator.php
@@ -17,7 +17,7 @@
 class AllowedValuesConstraintValidator extends ChoiceValidator {
 
   /**
-   * Implements \Symfony\Component\Validator\ConstraintValidatorInterface::validate().
+   * {@inheritdoc}
    */
   public function validate($typed_data, Constraint $constraint) {
     if ($this->context->getMetadata()->getTypedData() instanceof AllowedValuesInterface) {
diff --git a/core/modules/edit/lib/Drupal/edit/Tests/EditTestBase.php b/core/modules/edit/lib/Drupal/edit/Tests/EditTestBase.php
index 30aec3f..542e2bf 100644
--- a/core/modules/edit/lib/Drupal/edit/Tests/EditTestBase.php
+++ b/core/modules/edit/lib/Drupal/edit/Tests/EditTestBase.php
@@ -19,7 +19,7 @@ class EditTestBase extends DrupalUnitTestBase {
    *
    * @var array
    */
-  public static $modules = array('system', 'entity', 'entity_test', 'field', 'field_sql_storage', 'field_test', 'number', 'text', 'edit');
+  public static $modules = array('system', 'entity', 'entity_test', 'field', 'field_sql_storage', 'field_test', 'number', 'filter', 'user', 'text', 'edit');
   /**
    * Sets the default field storage backend for fields created during tests.
    */
@@ -28,7 +28,7 @@ function setUp() {
 
     $this->installSchema('system', 'variable');
     $this->installSchema('entity_test', array('entity_test', 'entity_test_rev'));
-    $this->installConfig(array('field'));
+    $this->installConfig(array('field', 'filter'));
   }
 
   /**
diff --git a/core/modules/filter/lib/Drupal/filter/Tests/FilterAPITest.php b/core/modules/filter/lib/Drupal/filter/Tests/FilterAPITest.php
index 841e75a..a066cad 100644
--- a/core/modules/filter/lib/Drupal/filter/Tests/FilterAPITest.php
+++ b/core/modules/filter/lib/Drupal/filter/Tests/FilterAPITest.php
@@ -118,8 +118,7 @@ function testTypedDataAPI() {
       $filtered_html_user = $this->drupalCreateUser(array(
         filter_permission_name(filter_format_load('filtered_html')),
       ));
-      // @todo Is there really no nicer way to do this?
-      $global_user = $GLOBALS['user'];
+      // Test with anonymous user.
       $GLOBALS['user'] = drupal_anonymous_user();
 
       $available_values = $data->getAvailableValues();
@@ -129,29 +128,16 @@ function testTypedDataAPI() {
         'Expected available format values found'
       );
       $available_options = $data->getAvailableOptions();
-      $this->assertEqual(
-        $available_options,
-        array(
-          'filtered_html' => 'Filtered HTML',
-          'full_html' => 'Full HTML',
-          'plain_text' => 'Plain text'
-        ),
-        'Expected available format options found'
+      $expected_available_options = array(
+        'filtered_html' => 'Filtered HTML',
+        'full_html' => 'Full HTML',
+        'plain_text' => 'Plain text',
       );
+      $this->assertEqual($available_options, $expected_available_options);
       $allowed_values = $data->getAllowedValues();
-      $this->assertEqual(
-        $allowed_values,
-        array('plain_text'),
-        'Expected allowed format values for anoymous found'
-      );
+      $this->assertEqual($allowed_values, array('plain_text'));
       $allowed_options = $data->getAllowedOptions();
-      $this->assertEqual(
-        $allowed_options,
-        array(
-          'plain_text' => 'Plain text'
-        ),
-        'Expected allowed format options for anoymous found'
-      );
+      $this->assertEqual($allowed_options, array('plain_text' => 'Plain text'));
 
       $data->setValue('foo');
       $violations = $data->validate();
@@ -166,28 +152,19 @@ function testTypedDataAPI() {
       $violations = $data->validate();
       $this->assertEqual(count($violations), 1, "Validation violation for protected format 'filtered_html' found.");
 
-      // Define user with access to 'filtered_html' format.
+      // Set user with access to 'filtered_html' format.
       $GLOBALS['user'] = $filtered_html_user;
       $violations = $data->validate();
       $this->assertEqual(count($violations), 0, "No validation violation for accessible format 'filtered_html' found.");
 
       $allowed_values = $data->getAllowedValues();
-      $this->assertEqual(
-        $allowed_values,
-        array('filtered_html', 'plain_text'),
-        'Expected allowed format values for authenticated user found'
-      );
+      $this->assertEqual($allowed_values, array('filtered_html', 'plain_text'));
       $allowed_options = $data->getAllowedOptions();
-      $this->assertEqual(
-        $allowed_options,
-        array(
-          'filtered_html' => 'Filtered HTML',
-          'plain_text' => 'Plain text'
-        ),
-        'Expected allowed format options for authenticated user found'
+      $expected_allowed_options = array(
+        'filtered_html' => 'Filtered HTML',
+        'plain_text' => 'Plain text',
       );
-
-      $GLOBALS['user'] = $global_user;
+      $this->assertEqual($allowed_options, $expected_allowed_options);
     }
   }
 
diff --git a/core/modules/filter/lib/Drupal/filter/Type/FilterFormat.php b/core/modules/filter/lib/Drupal/filter/Type/FilterFormat.php
index c66f58a..bfcc8c9 100644
--- a/core/modules/filter/lib/Drupal/filter/Type/FilterFormat.php
+++ b/core/modules/filter/lib/Drupal/filter/Type/FilterFormat.php
@@ -18,16 +18,15 @@ class FilterFormat extends String implements AllowedValuesInterface {
   /**
    * {@inheritdoc}
    */
-  public function getAvailableValues(\Drupal\user\Plugin\Core\Entity\User $user = NULL) {
+  public function getAvailableValues($user = NULL) {
     return array_keys($this->getAvailableOptions());
   }
 
   /**
    * {@inheritdoc}
    */
-  public function getAvailableOptions(\Drupal\user\Plugin\Core\Entity\User $user = NULL) {
+  public function getAvailableOptions($user = NULL) {
     $values = array();
-    // @todo Evil call to procedural code, how can we get rid of it?
     foreach (filter_formats() as $format) {
       $values[$format->id()] = $format->label();
     }
@@ -37,14 +36,14 @@ public function getAvailableOptions(\Drupal\user\Plugin\Core\Entity\User $user =
   /**
    * {@inheritdoc}
    */
-  public function getAllowedValues(\Drupal\user\Plugin\Core\Entity\User $user = NULL) {
+  public function getAllowedValues($user = NULL) {
     return array_keys($this->getAllowedOptions($user));
   }
 
   /**
    * {@inheritdoc}
    */
-  public function getAllowedOptions(\Drupal\user\Plugin\Core\Entity\User $user = NULL) {
+  public function getAllowedOptions($user = NULL) {
     $user = empty($user) ? $GLOBALS['user'] : $user;
     $values = array();
     // @todo Evil call to procedural code, how can we get rid of it?
diff --git a/core/modules/hal/lib/Drupal/hal/Tests/NormalizerTestBase.php b/core/modules/hal/lib/Drupal/hal/Tests/NormalizerTestBase.php
index 2d73a24..38869f2 100644
--- a/core/modules/hal/lib/Drupal/hal/Tests/NormalizerTestBase.php
+++ b/core/modules/hal/lib/Drupal/hal/Tests/NormalizerTestBase.php
@@ -30,7 +30,7 @@
    *
    * @var array
    */
-  public static $modules = array('entity', 'entity_test', 'entity_reference', 'field', 'field_sql_storage', 'hal', 'language', 'rest', 'serialization', 'system', 'text', 'user');
+  public static $modules = array('entity', 'entity_test', 'entity_reference', 'field', 'field_sql_storage', 'hal', 'language', 'rest', 'serialization', 'system', 'text', 'user', 'filter');
 
   /**
    * The mock serializer.
diff --git a/core/modules/serialization/lib/Drupal/serialization/Tests/NormalizerTestBase.php b/core/modules/serialization/lib/Drupal/serialization/Tests/NormalizerTestBase.php
index 1d9bff6..c147d61 100644
--- a/core/modules/serialization/lib/Drupal/serialization/Tests/NormalizerTestBase.php
+++ b/core/modules/serialization/lib/Drupal/serialization/Tests/NormalizerTestBase.php
@@ -16,7 +16,7 @@
    *
    * @var array
    */
-  public static $modules = array('serialization', 'system', 'entity', 'field', 'entity_test', 'text', 'field_sql_storage');
+  public static $modules = array('serialization', 'system', 'entity', 'field', 'entity_test', 'text', 'filter', 'field_sql_storage');
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/text/lib/Drupal/text/Tests/Formatter/TextFormattedUnitTest.php b/core/modules/text/lib/Drupal/text/Tests/Formatter/TextFormattedUnitTest.php
deleted file mode 100644
index 5b6b50a..0000000
--- a/core/modules/text/lib/Drupal/text/Tests/Formatter/TextFormattedUnitTest.php
+++ /dev/null
@@ -1,110 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\text\Tests\Formatter\TextPlainUnitTest.
- */
-
-namespace Drupal\text\Tests\Formatter;
-
-use Drupal\Core\Entity\EntityInterface;
-use Drupal\entity\Plugin\Core\Entity\EntityDisplay;
-use Drupal\simpletest\DrupalUnitTestBase;
-
-/**
- * Tests the text_plain field formatter.
- *
- * @todo Move assertion helper methods into DrupalUnitTestBase.
- * @todo Move field helper methods, $modules, and setUp() into a new
- *   FieldPluginUnitTestBase.
- */
-class TextFormattedUnitTest extends TextPlainUnitTest {
-
-  /**
-   * Modules to enable.
-   *
-   * @var array
-   */
-  public static $modules = array('system', 'entity', 'field', 'field_sql_storage', 'text', 'field_test', 'user', 'filter', 'entity_test');
-
-  /**
-   * Contains rendered content.
-   *
-   * @var string
-   */
-  protected $content;
-
-  public static function getInfo() {
-    return array(
-      'name'  => 'Text field formatted text',
-      'description'  => "Test the creation of text fields with a filter format.",
-      'group' => 'Field types',
-    );
-  }
-
-  function setUp() {
-    parent::setUp();
-
-    // Configure the theme system.
-    $this->installConfig(array('system', 'field', 'filter'));
-
-    // @todo Add helper methods for all of the following.
-
-    $this->entity_type = 'entity_test';
-    if (!isset($this->bundle)) {
-      $this->bundle = $this->entity_type;
-    }
-
-    $this->field_name = drupal_strtolower($this->randomName());
-    $this->field_type = 'text_long';
-    $this->field_settings = array();
-    $this->instance_settings = array(
-      'text_processing' => TRUE,
-    );
-
-    $this->formatter_type = 'text_plain';
-    $this->formatter_settings = array();
-
-    $this->field = array(
-      'field_name' => $this->field_name,
-      'type' => $this->field_type,
-      'settings' => $this->field_settings,
-    );
-    $this->field = field_create_field($this->field);
-
-    $this->instance = array(
-      'entity_type' => $this->entity_type,
-      'bundle' => $this->bundle,
-      'field_name' => $this->field_name,
-      'label' => $this->randomName(),
-      'settings' => $this->instance_settings,
-    );
-    $this->instance = field_create_instance($this->instance);
-
-    $this->view_mode = 'default';
-    $this->display = entity_get_display($this->entity_type, $this->bundle, $this->view_mode)
-      ->setComponent($this->field_name, array(
-        'type' => $this->formatter_type,
-        'settings' => $this->formatter_settings,
-      ));
-    $this->display->save();
-
-    $this->langcode = LANGUAGE_NOT_SPECIFIED;
-  }
-
-  /**
-   * Tests text_plain formatter output.
-   */
-  function testPlainText() {
-    $value = $this->randomString();
-
-    $entity = $this->createEntity(array());
-    $this->setFieldItem($entity, $this->field_name, array(
-      'value' => $value,
-      'format' => 'x',
-    ));
-    $x = $entity->{$this->field_name}->validate();
-    debug($x);
-  }
-
-}
