diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/FieldBooleanTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/FieldBooleanTest.php
index b3d3599..552c2fc 100644
--- a/core/modules/views/lib/Drupal/views/Tests/Handler/FieldBooleanTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/Handler/FieldBooleanTest.php
@@ -7,10 +7,12 @@
 
 namespace Drupal\views\Tests\Handler;
 
+use Drupal\views\Tests\ViewUnitTestBase;
+
 /**
  * Tests the core Drupal\views\Plugin\views\field\Boolean handler.
  */
-class FieldBooleanTest extends HandlerTestBase {
+class FieldBooleanTest extends ViewUnitTestBase {
 
   public static function getInfo() {
     return array(
@@ -41,7 +43,8 @@ function viewsData() {
   }
 
   public function testFieldBoolean() {
-    $view = $this->getView();
+    $view = views_get_view('test_view');
+    $view->setDisplay();
 
     $view->displayHandlers['default']->overrideOption('fields', array(
       'age' => array(
diff --git a/core/modules/views/lib/Drupal/views/Tests/ViewUnitTestBase.php b/core/modules/views/lib/Drupal/views/Tests/ViewUnitTestBase.php
new file mode 100644
index 0000000..9b60c27
--- /dev/null
+++ b/core/modules/views/lib/Drupal/views/Tests/ViewUnitTestBase.php
@@ -0,0 +1,338 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\views\Tests\ViewUnitTestBase.
+ */
+
+namespace Drupal\views\Tests;
+
+use Drupal\views\ViewExecutable;
+use Drupal\simpletest\DrupalUnitTestBase;
+
+/**
+ * Abstract class for views testing.
+ */
+abstract class ViewUnitTestBase extends DrupalUnitTestBase {
+
+  /**
+   * The view to use for the test.
+   *
+   * @var \Drupal\views\ViewExecutable
+   */
+  protected $view;
+
+  protected function setUp() {
+    parent::setUp();
+    $this->enableModules(array('views'));
+    foreach (ViewExecutable::getPluginTypes() as $type) {
+      if ($type == 'join') {
+        $this->container->register('plugin.manager.views.join', 'Drupal\views\Plugin\Type\JoinManager');
+      }
+      elseif ($type == 'wizard') {
+        $this->container->register('plugin.manager.views.wizard', 'Drupal\views\Plugin\Type\WizardManager');
+      }
+      else {
+        $this->container->register("plugin.manager.views.$type", 'Drupal\views\Plugin\Type\PluginManager')
+          ->addArgument($type);
+      }
+    }
+  }
+
+  /**
+   * Sets up the views_test_data.module.
+   *
+   * Because the schema of views_test_data.module is dependent on the test using it,
+   * it cannot be enabled normally.
+   */
+  protected function enableViewsTestModule() {
+    // Define the schema and views data variable before enabling the test module.
+    state()->set('views_test_data_schema', $this->schemaDefinition());
+    state()->set('views_test_data_views_data', $this->viewsData());
+
+    $this->enableModules(array('views_test_data'));
+
+    // Load the test dataset.
+    $data_set = $this->dataSet();
+    $query = db_insert('views_test_data')
+      ->fields(array_keys($data_set[0]));
+    foreach ($data_set as $record) {
+      $query->values($record);
+    }
+    $query->execute();
+  }
+
+  /**
+   * Helper function: verify a result set returned by view.
+   *
+   * The comparison is done on the string representation of the columns of the
+   * column map, taking the order of the rows into account, but not the order
+   * of the columns.
+   *
+   * @param $view
+   *  An executed View.
+   * @param $expected_result
+   *  An expected result set.
+   * @param $column_map
+   *  An associative array mapping the columns of the result set from the view
+   *  (as keys) and the expected result set (as values).
+   */
+  protected function assertIdenticalResultset($view, $expected_result, $column_map = array(), $message = 'Identical result set') {
+    return $this->assertIdenticalResultsetHelper($view, $expected_result, $column_map, $message, 'assertIdentical');
+  }
+
+  /**
+   * Helper function: verify a result set returned by view..
+   *
+   * Inverse of ViewsTestCase::assertIdenticalResultset().
+   *
+   * @param $view
+   *  An executed View.
+   * @param $expected_result
+   *  An expected result set.
+   * @param $column_map
+   *  An associative array mapping the columns of the result set from the view
+   *  (as keys) and the expected result set (as values).
+   */
+  protected function assertNotIdenticalResultset($view, $expected_result, $column_map = array(), $message = 'Identical result set') {
+    return $this->assertIdenticalResultsetHelper($view, $expected_result, $column_map, $message, 'assertNotIdentical');
+  }
+
+  protected function assertIdenticalResultsetHelper($view, $expected_result, $column_map, $message, $assert_method) {
+    // Convert $view->result to an array of arrays.
+    $result = array();
+    foreach ($view->result as $key => $value) {
+      $row = array();
+      foreach ($column_map as $view_column => $expected_column) {
+        // The comparison will be done on the string representation of the value.
+        $row[$expected_column] = (string) $value->$view_column;
+      }
+      $result[$key] = $row;
+    }
+
+    // Remove the columns we don't need from the expected result.
+    foreach ($expected_result as $key => $value) {
+      $row = array();
+      foreach ($column_map as $expected_column) {
+        // The comparison will be done on the string representation of the value.
+        $row[$expected_column] = (string) (is_object($value) ? $value->$expected_column : $value[$expected_column]);
+      }
+      $expected_result[$key] = $row;
+    }
+
+    // Reset the numbering of the arrays.
+    $result = array_values($result);
+    $expected_result = array_values($expected_result);
+
+    $this->verbose('<pre>Returned data set: ' . print_r($result, TRUE) . "\n\nExpected: ". print_r($expected_result, TRUE));
+
+    // Do the actual comparison.
+    return $this->$assert_method($result, $expected_result, $message);
+  }
+
+  /**
+   * Helper function to execute a view with debugging.
+   *
+   * @param view $view
+   * @param array $args
+   */
+  protected function executeView($view, $args = array()) {
+    $view->setDisplay();
+    $view->preExecute($args);
+    $view->execute();
+    $this->verbose('<pre>Executed view: ' . ((string) $view->build_info['query']) . '</pre>');
+  }
+
+  /**
+   * The schema definition.
+   */
+  protected function schemaDefinition() {
+    $schema['views_test_data'] = array(
+      'description' => 'Basic test table for Views tests.',
+      'fields' => array(
+        'id' => array(
+          'type' => 'serial',
+          'unsigned' => TRUE,
+          'not null' => TRUE,
+        ),
+        'name' => array(
+          'description' => "A person's name",
+          'type' => 'varchar',
+          'length' => 255,
+          'not null' => TRUE,
+          'default' => '',
+        ),
+        'age' => array(
+          'description' => "The person's age",
+          'type' => 'int',
+          'unsigned' => TRUE,
+          'not null' => TRUE,
+          'default' => 0),
+        'job' => array(
+          'description' => "The person's job",
+          'type' => 'varchar',
+          'length' => 255,
+          'not null' => TRUE,
+          'default' => 'Undefined',
+        ),
+        'created' => array(
+          'description' => "The creation date of this record",
+          'type' => 'int',
+          'unsigned' => TRUE,
+          'not null' => TRUE,
+          'default' => 0,
+        ),
+      ),
+      'primary key' => array('id'),
+      'unique keys' => array(
+        'name' => array('name')
+      ),
+      'indexes' => array(
+        'ages' => array('age'),
+      ),
+    );
+    return $schema;
+  }
+
+  /**
+   * The views data definition.
+   */
+  protected function viewsData() {
+    // Declaration of the base table.
+    $data['views_test_data']['table'] = array(
+      'group' => t('Views test'),
+      'base' => array(
+        'field' => 'id',
+        'title' => t('Views test data'),
+        'help' => t('Users who have created accounts on your site.'),
+      ),
+    );
+
+    // Declaration of fields.
+    $data['views_test_data']['id'] = array(
+      'title' => t('ID'),
+      'help' => t('The test data ID'),
+      'field' => array(
+        'id' => 'numeric',
+        'click sortable' => TRUE,
+      ),
+      'argument' => array(
+        'id' => 'numeric',
+      ),
+      'filter' => array(
+        'id' => 'numeric',
+      ),
+      'sort' => array(
+        'id' => 'standard',
+      ),
+    );
+    $data['views_test_data']['name'] = array(
+      'title' => t('Name'),
+      'help' => t('The name of the person'),
+      'field' => array(
+        'id' => 'standard',
+        'click sortable' => TRUE,
+      ),
+      'argument' => array(
+        'id' => 'string',
+      ),
+      'filter' => array(
+        'id' => 'string',
+      ),
+      'sort' => array(
+        'id' => 'standard',
+      ),
+    );
+    $data['views_test_data']['age'] = array(
+      'title' => t('Age'),
+      'help' => t('The age of the person'),
+      'field' => array(
+        'id' => 'numeric',
+        'click sortable' => TRUE,
+      ),
+      'argument' => array(
+        'id' => 'numeric',
+      ),
+      'filter' => array(
+        'id' => 'numeric',
+      ),
+      'sort' => array(
+        'id' => 'standard',
+      ),
+    );
+    $data['views_test_data']['job'] = array(
+      'title' => t('Job'),
+      'help' => t('The job of the person'),
+      'field' => array(
+        'id' => 'standard',
+        'click sortable' => TRUE,
+      ),
+      'argument' => array(
+        'id' => 'string',
+      ),
+      'filter' => array(
+        'id' => 'string',
+      ),
+      'sort' => array(
+        'id' => 'standard',
+      ),
+    );
+    $data['views_test_data']['created'] = array(
+      'title' => t('Created'),
+      'help' => t('The creation date of this record'),
+      'field' => array(
+        'id' => 'date',
+        'click sortable' => TRUE,
+      ),
+      'argument' => array(
+        'id' => 'date',
+      ),
+      'filter' => array(
+        'id' => 'date',
+      ),
+      'sort' => array(
+        'id' => 'date',
+      ),
+    );
+    return $data;
+  }
+
+  /**
+   * A very simple test dataset.
+   */
+  protected function dataSet() {
+    return array(
+      array(
+        'name' => 'John',
+        'age' => 25,
+        'job' => 'Singer',
+        'created' => gmmktime(0, 0, 0, 1, 1, 2000),
+      ),
+      array(
+        'name' => 'George',
+        'age' => 27,
+        'job' => 'Singer',
+        'created' => gmmktime(0, 0, 0, 1, 2, 2000),
+      ),
+      array(
+        'name' => 'Ringo',
+        'age' => 28,
+        'job' => 'Drummer',
+        'created' => gmmktime(6, 30, 30, 1, 1, 2000),
+      ),
+      array(
+        'name' => 'Paul',
+        'age' => 26,
+        'job' => 'Songwriter',
+        'created' => gmmktime(6, 0, 0, 1, 1, 2000),
+      ),
+      array(
+        'name' => 'Meredith',
+        'age' => 30,
+        'job' => 'Speaker',
+        'created' => gmmktime(6, 30, 10, 1, 1, 2000),
+      ),
+    );
+  }
+
+}
