From 5799c9fa3543e7d7f5e453d1281e7d58db7fa45d Mon Sep 17 00:00:00 2001
From: damiankloip <damian@damoweb.co.uk>
Date: Mon, 27 Aug 2012 09:46:30 +0200
Subject: [PATCH] Renamed ViewsStorageTest and ViewsDisplay.

---
 .../{ViewsStorageTest.php => ViewStorageTest.php}    | 12 ++++++------
 .../views/{ViewsDisplay.php => ViewDisplay.php}      |  4 ++--
 lib/Drupal/views/ViewStorage.php                     |  2 +-
 lib/Drupal/views/ViewStorageController.php           |  6 +++---
 4 files changed, 12 insertions(+), 12 deletions(-)
 rename lib/Drupal/views/Tests/{ViewsStorageTest.php => ViewStorageTest.php} (92%)
 rename lib/Drupal/views/{ViewsDisplay.php => ViewDisplay.php} (92%)

diff --git a/lib/Drupal/views/Tests/ViewsStorageTest.php b/lib/Drupal/views/Tests/ViewStorageTest.php
similarity index 92%
rename from lib/Drupal/views/Tests/ViewsStorageTest.php
rename to lib/Drupal/views/Tests/ViewStorageTest.php
index e456d18e76ac..1f93e60554d3 100644
--- a/lib/Drupal/views/Tests/ViewsStorageTest.php
+++ b/lib/Drupal/views/Tests/ViewStorageTest.php
@@ -1,7 +1,7 @@
 <?php
 
 /**
- * Definition of Drupal\views\Tests\ViewsStorageTest.
+ * Definition of Drupal\views\Tests\ViewStorageTest.
  */
 
 namespace Drupal\views\Tests;
@@ -9,12 +9,12 @@
 use Drupal\simpletest\WebTestBase;
 use Drupal\views\ViewStorageController;
 use Drupal\views\View;
-use Drupal\views\ViewsDisplay;
+use Drupal\views\ViewDisplay;
 
 /**
- * Tests that functionality of the the ViewsStorageController.
+ * Tests that functionality of the the ViewStorageController.
  */
-class ViewsStorageTest extends WebTestBase {
+class ViewStorageTest extends WebTestBase {
 
   /**
    * Properties that should be stored in the configuration.
@@ -80,7 +80,7 @@ function testConfigurableCRUD() {
 
     // Check each ViewDisplay object and confirm that it has the correct key.
     foreach ($view->display as $key => $display) {
-      $this->assertTrue($display instanceof ViewsDisplay, format_string('Display: @display is instance of ViewsDisplay.', array('@display' => $key)));
+      $this->assertTrue($display instanceof ViewDisplay, format_string('Display: @display is instance of ViewDisplay.', array('@display' => $key)));
       $this->assertEqual($key, $display->id, 'The display has the correct ID.');
       // Confirm that the display options array exists.
       $display_options = $display->display_options;
@@ -131,7 +131,7 @@ function testConfigurableCRUD() {
 
     // Test created displays.
     foreach ($created->display as $key => $display) {
-      $this->assertTrue($display instanceof ViewsDisplay, format_string('Display @display is an instance of ViewsDisplay.', array('@display' => $key)));
+      $this->assertTrue($display instanceof ViewDisplay, format_string('Display @display is an instance of ViewDisplay.', array('@display' => $key)));
     }
 
     // Save the newly created view, but modify the name.
diff --git a/lib/Drupal/views/ViewsDisplay.php b/lib/Drupal/views/ViewDisplay.php
similarity index 92%
rename from lib/Drupal/views/ViewsDisplay.php
rename to lib/Drupal/views/ViewDisplay.php
index 0248de766fc1..1e374d431d94 100644
--- a/lib/Drupal/views/ViewsDisplay.php
+++ b/lib/Drupal/views/ViewDisplay.php
@@ -2,7 +2,7 @@
 
 /**
  * @file
- * Definition of Drupal\views\ViewsDisplay.
+ * Definition of Drupal\views\ViewDisplay.
  */
 
 namespace Drupal\views;
@@ -13,7 +13,7 @@
  * This is just the database storage mechanism, and isn't terribly important
  * to the behavior of the display at all.
  */
-class ViewsDisplay {
+class ViewDisplay {
 
   /**
    * The display handler itself, which has all the methods.
diff --git a/lib/Drupal/views/ViewStorage.php b/lib/Drupal/views/ViewStorage.php
index b19cc0aed477..db3a6d8d2a4f 100644
--- a/lib/Drupal/views/ViewStorage.php
+++ b/lib/Drupal/views/ViewStorage.php
@@ -78,7 +78,7 @@ function add_display($type = 'page', $title = NULL, $id = NULL) {
     );
 
     // Create the new display object
-    $display = new ViewsDisplay($display_options);
+    $display = new ViewDisplay($display_options);
 
     // Add the new display object to the view.
     $this->display[$id] = $display;
diff --git a/lib/Drupal/views/ViewStorageController.php b/lib/Drupal/views/ViewStorageController.php
index 6671187db716..ef5911aa09d9 100644
--- a/lib/Drupal/views/ViewStorageController.php
+++ b/lib/Drupal/views/ViewStorageController.php
@@ -110,7 +110,7 @@ public function create(array $values) {
   }
 
   /**
-   * Attaches an array of ViewsDisplay objects to the view display property.
+   * Attaches an array of ViewDisplay objects to the view display property.
    *
    * @param Drupal\entity\StorableInterface $entity
    */
@@ -118,8 +118,8 @@ protected function attachDisplays($entity) {
     if (isset($entity->display) && is_array($entity->display)) {
       $displays = array();
       foreach ($entity->get('display') as $key => $options) {
-        // Create a ViewsDisplay object using the display options.
-        $displays[$key] = new ViewsDisplay($options);
+        // Create a ViewDisplay object using the display options.
+        $displays[$key] = new ViewDisplay($options);
       }
       $entity->set('display', $displays);
     }
-- 
GitLab