diff --git a/core/modules/views/lib/Drupal/views/Tests/ViewTestBase.php b/core/modules/views/lib/Drupal/views/Tests/ViewTestBase.php index fb78834..2f1b2ab 100644 --- a/core/modules/views/lib/Drupal/views/Tests/ViewTestBase.php +++ b/core/modules/views/lib/Drupal/views/Tests/ViewTestBase.php @@ -7,6 +7,7 @@ namespace Drupal\views\Tests; +use Drupal\Core\Database\Query\SelectInterface; use Drupal\simpletest\WebTestBase; use Drupal\views\ViewExecutable; use Drupal\block\Plugin\Core\Entity\Block; @@ -228,9 +229,11 @@ protected function executeView($view, $args = array()) { $view->setDisplay(); $view->preExecute($args); $view->execute(); - $this->verbose('
Executed view: ' . ((string) $view->build_info['query']). '
' . - '
Arguments: ' . print_r($view->build_info['query']->getArguments(), TRUE) . '
' - ); + $verbose_message = '
Executed view: ' . ((string) $view->build_info['query']). '
'; + if ($view->build_info['query'] instanceof SelectInterface) { + $verbose_message .= '
Arguments: ' . print_r($view->build_info['query']->getArguments(), TRUE) . '
'; + } + $this->verbose($verbose_message); } /** diff --git a/core/modules/views/lib/Drupal/views/Tests/ViewUnitTestBase.php b/core/modules/views/lib/Drupal/views/Tests/ViewUnitTestBase.php index a9a3f1c..ab8173a 100644 --- a/core/modules/views/lib/Drupal/views/Tests/ViewUnitTestBase.php +++ b/core/modules/views/lib/Drupal/views/Tests/ViewUnitTestBase.php @@ -7,6 +7,7 @@ namespace Drupal\views\Tests; +use Drupal\Core\Database\Query\SelectInterface; use Drupal\views\ViewExecutable; use Drupal\views\ViewsBundle; use Drupal\simpletest\DrupalUnitTestBase; @@ -222,9 +223,11 @@ protected function executeView($view, $args = array()) { $view->setDisplay(); $view->preExecute($args); $view->execute(); - $this->verbose('
Executed view: ' . ((string) $view->build_info['query']). '
' . - '
Arguments: ' . print_r($view->build_info['query']->getArguments(), TRUE) . '
' - ); + $verbose_message = '
Executed view: ' . ((string) $view->build_info['query']). '
'; + if ($view->build_info['query'] instanceof SelectInterface) { + $verbose_message .= '
Arguments: ' . print_r($view->build_info['query']->getArguments(), TRUE) . '
'; + } + $this->verbose($verbose_message); } /**