From 8aab1a030eef2bb08b8022025d5da991c56c1715 Mon Sep 17 00:00:00 2001 From: webchick <webchick@24967.no-reply.drupal.org> Date: Thu, 26 Dec 2013 09:47:10 -0800 Subject: [PATCH] Revert "Issue #2149107 by longwave: "View" area handler in Views gives fatal error." Busted HEAD. This reverts commit cfd1c3ae1def7d59d603aa150f353e2e1a37a507. --- .../Drupal/views/Plugin/views/area/View.php | 2 +- .../views/Tests/Handler/AreaViewTest.php | 66 ------------------- .../test_views/views.view.test_area_view.yml | 50 -------------- 3 files changed, 1 insertion(+), 117 deletions(-) delete mode 100644 core/modules/views/lib/Drupal/views/Tests/Handler/AreaViewTest.php delete mode 100644 core/modules/views/tests/modules/views_test_config/test_views/views.view.test_area_view.yml diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/area/View.php b/core/modules/views/lib/Drupal/views/Plugin/views/area/View.php index 6fcf82068a15..412f19289c8c 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/area/View.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/area/View.php @@ -107,7 +107,7 @@ public function render($empty = FALSE) { if (!empty($this->options['view_to_insert'])) { list($view_name, $display_id) = explode(':', $this->options['view_to_insert']); - $view = $this->viewStorage->load($view_name)->getExecutable(); + $view = $this->viewStorage->load($view_name); if (empty($view) || !$view->access($display_id)) { return array(); diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/AreaViewTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/AreaViewTest.php deleted file mode 100644 index a99a3169b6d6..000000000000 --- a/core/modules/views/lib/Drupal/views/Tests/Handler/AreaViewTest.php +++ /dev/null @@ -1,66 +0,0 @@ -<?php - -/** - * @file - * Contains \Drupal\views\Tests\Handler\AreaViewTest. - */ - -namespace Drupal\views\Tests\Handler; - -use Drupal\views\Tests\ViewUnitTestBase; -use Drupal\views\Views; - -/** - * Tests the view area handler. - * - * @see \Drupal\views\Plugin\views\area\View - */ -class AreaViewTest extends ViewUnitTestBase { - - /** - * Modules to enable. - * - * @var array - */ - public static $modules = array('user'); - - /** - * Views used by this test. - * - * @var array - */ - public static $testViews = array('test_area_view', 'test_simple_argument'); - - /** - * {@inheritdoc} - */ - public static function getInfo() { - return array( - 'name' => 'Area: View', - 'description' => 'Tests the view area handler.', - 'group' => 'Views Handlers', - ); - } - - /** - * Tests the view area handler. - */ - public function testViewArea() { - $view = Views::getView('test_area_view'); - - $this->executeView($view); - $output = $view->render(); - $output = drupal_render($output); - $this->assertTrue(strpos($output, 'view-test-simple-argument') !== FALSE, 'The test view is correctly embedded.'); - $view->destroy(); - - $view->setArguments(array(27)); - $this->executeView($view); - $output = $view->render(); - $output = drupal_render($output); - $this->assertTrue(strpos($output, 'John') === FALSE, 'The test view is correctly embedded with inherited arguments.'); - $this->assertTrue(strpos($output, 'George') !== FALSE, 'The test view is correctly embedded with inherited arguments.'); - $view->destroy(); - } - -} diff --git a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_area_view.yml b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_area_view.yml deleted file mode 100644 index ffd51734eeca..000000000000 --- a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_area_view.yml +++ /dev/null @@ -1,50 +0,0 @@ -base_table: views_test_data -core: '8' -description: '' -status: '1' -display: - default: - display_options: - defaults: - fields: '0' - pager: '0' - pager_options: '0' - sorts: '0' - fields: - id: - field: id - id: id - relationship: none - table: views_test_data - plugin_id: numeric - provider: views_test_data - pager: - options: - offset: '0' - type: none - pager_options: { } - sorts: - id: - field: id - id: id - order: ASC - relationship: none - table: views_test_data - plugin_id: numeric - provider: views_test_data - header: - view: - field: view - id: view - table: views - view_to_insert: test_simple_argument:default - inherit_arguments: 1 - plugin_id: view - provider: views - display_plugin: default - display_title: Master - id: default - position: '0' -label: '' -id: test_area_view -tag: '' -- GitLab