Commit c8daa8d2 authored by webchick's avatar webchick
Browse files

Issue #2897009 follow-up by Lendude: Remove stray code accidentally included in patch.

parent e5493741
......@@ -2,7 +2,6 @@
namespace Drupal\views;
use Drupal\Component\Render\FormattableMarkup;
use Drupal\Component\Utility\Html;
use Drupal\Component\Utility\Tags;
use Drupal\Core\Routing\RouteProviderInterface;
......@@ -800,7 +799,7 @@ public function setDisplay($display_id = NULL) {
// Ensure the requested display exists.
if (!$this->displayHandlers->has($display_id)) {
trigger_error(new FormattableMarkup('setDisplay() called with invalid display ID "@display".', ['@display' => $display_id]));
debug(format_string('setDisplay() called with invalid display ID "@display".', ['@display' => $display_id]));
return FALSE;
......@@ -196,12 +196,8 @@ public function testSetDisplayWithInvalidDisplay() {
// Error is triggered while calling the wrong display.
try {
catch (\PHPUnit_Framework_Error $e) {
$this->assertEquals('setDisplay() called with invalid display ID "invalid".', $e->getMessage());
$this->assertEqual($view->current_display, 'default', 'If setDisplay is called with an invalid display id the default display should be used.');
$this->assertEqual(spl_object_hash($view->display_handler), spl_object_hash($view->displayHandlers->get('default')));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment