From d6df3026c0a2e892bb8254318aabef92e8dfbe31 Mon Sep 17 00:00:00 2001
From: Mariano D'Agostino <dagmar@154086.no-reply.drupal.org>
Date: Wed, 25 Mar 2015 10:39:18 -0300
Subject: [PATCH] Issue #2450447: Drupal QA is broken for Views 7.x-3.x

---
 test_templates/README.txt                     | 11 ++++
 test_templates/views-view--frontpage.tpl.php  | 85 +++++++++++++++++++++++++++
 tests/templates/views-view--frontpage.tpl.php | 85 ---------------------------
 tests/views_test.module                       |  2 +-
 4 files changed, 97 insertions(+), 86 deletions(-)
 create mode 100644 test_templates/README.txt
 create mode 100644 test_templates/views-view--frontpage.tpl.php
 delete mode 100644 tests/templates/views-view--frontpage.tpl.php

diff --git a/test_templates/README.txt b/test_templates/README.txt
new file mode 100644
index 0000000..551f738
--- /dev/null
+++ b/test_templates/README.txt
@@ -0,0 +1,11 @@
+Workaround for:
+
+- https://www.drupal.org/node/2450447
+- https://www.drupal.org/node/2415991
+
+
+Files of this folder cannot be included inside the views/tests directory because
+they are included as tests cases and make testbot crash.
+
+This files could be moved to tests/templates once
+https://www.drupal.org/node/2415991 be properly fixed.
diff --git a/test_templates/views-view--frontpage.tpl.php b/test_templates/views-view--frontpage.tpl.php
new file mode 100644
index 0000000..eb4f58b
--- /dev/null
+++ b/test_templates/views-view--frontpage.tpl.php
@@ -0,0 +1,85 @@
+<?php
+
+/**
+ * @file
+ * Main view template.
+ *
+ * Variables available:
+ * - $classes_array: An array of classes determined in
+ *   template_preprocess_views_view(). Default classes are:
+ *     .view
+ *     .view-[css_name]
+ *     .view-id-[view_name]
+ *     .view-display-id-[display_name]
+ *     .view-dom-id-[dom_id]
+ * - $classes: A string version of $classes_array for use in the class attribute
+ * - $css_name: A css-safe version of the view name.
+ * - $css_class: The user-specified classes names, if any
+ * - $header: The view header
+ * - $footer: The view footer
+ * - $rows: The results of the view query, if any
+ * - $empty: The empty text to display if the view is empty
+ * - $pager: The pager next/prev links to display, if any
+ * - $exposed: Exposed widget form/info to display
+ * - $feed_icon: Feed icon to display, if any
+ * - $more: A link to view more, if any
+ *
+ * @ingroup views_templates
+ */
+?>
+<div class="<?php print $classes; ?>">
+  <?php if ($header): ?>
+    <div class="view-header">
+      <?php print $header; ?>
+    </div>
+  <?php endif; ?>
+
+  <?php if ($exposed): ?>
+    <div class="view-filters">
+      <?php print $exposed; ?>
+    </div>
+  <?php endif; ?>
+
+  <?php if ($attachment_before): ?>
+    <div class="attachment attachment-before">
+      <?php print $attachment_before; ?>
+    </div>
+  <?php endif; ?>
+
+  <?php if ($rows): ?>
+    <div class="view-content">
+      <?php print $rows; ?>
+    </div>
+  <?php elseif ($empty): ?>
+    <div class="view-empty">
+      <?php print $empty; ?>
+    </div>
+  <?php endif; ?>
+
+  <?php if ($pager): ?>
+    <?php print $pager; ?>
+  <?php endif; ?>
+
+  <?php if ($attachment_after): ?>
+    <div class="attachment attachment-after">
+      <?php print $attachment_after; ?>
+    </div>
+  <?php endif; ?>
+
+  <?php if ($more): ?>
+    <?php print $more; ?>
+  <?php endif; ?>
+
+  <?php if ($footer): ?>
+    <div class="view-footer">
+      <?php print $footer; ?>
+    </div>
+  <?php endif; ?>
+
+  <?php if ($feed_icon): ?>
+    <div class="feed-icon">
+      <?php print $feed_icon; ?>
+    </div>
+  <?php endif; ?>
+
+</div> <?php /* class view */ ?>
diff --git a/tests/templates/views-view--frontpage.tpl.php b/tests/templates/views-view--frontpage.tpl.php
deleted file mode 100644
index eb4f58b..0000000
--- a/tests/templates/views-view--frontpage.tpl.php
+++ /dev/null
@@ -1,85 +0,0 @@
-<?php
-
-/**
- * @file
- * Main view template.
- *
- * Variables available:
- * - $classes_array: An array of classes determined in
- *   template_preprocess_views_view(). Default classes are:
- *     .view
- *     .view-[css_name]
- *     .view-id-[view_name]
- *     .view-display-id-[display_name]
- *     .view-dom-id-[dom_id]
- * - $classes: A string version of $classes_array for use in the class attribute
- * - $css_name: A css-safe version of the view name.
- * - $css_class: The user-specified classes names, if any
- * - $header: The view header
- * - $footer: The view footer
- * - $rows: The results of the view query, if any
- * - $empty: The empty text to display if the view is empty
- * - $pager: The pager next/prev links to display, if any
- * - $exposed: Exposed widget form/info to display
- * - $feed_icon: Feed icon to display, if any
- * - $more: A link to view more, if any
- *
- * @ingroup views_templates
- */
-?>
-<div class="<?php print $classes; ?>">
-  <?php if ($header): ?>
-    <div class="view-header">
-      <?php print $header; ?>
-    </div>
-  <?php endif; ?>
-
-  <?php if ($exposed): ?>
-    <div class="view-filters">
-      <?php print $exposed; ?>
-    </div>
-  <?php endif; ?>
-
-  <?php if ($attachment_before): ?>
-    <div class="attachment attachment-before">
-      <?php print $attachment_before; ?>
-    </div>
-  <?php endif; ?>
-
-  <?php if ($rows): ?>
-    <div class="view-content">
-      <?php print $rows; ?>
-    </div>
-  <?php elseif ($empty): ?>
-    <div class="view-empty">
-      <?php print $empty; ?>
-    </div>
-  <?php endif; ?>
-
-  <?php if ($pager): ?>
-    <?php print $pager; ?>
-  <?php endif; ?>
-
-  <?php if ($attachment_after): ?>
-    <div class="attachment attachment-after">
-      <?php print $attachment_after; ?>
-    </div>
-  <?php endif; ?>
-
-  <?php if ($more): ?>
-    <?php print $more; ?>
-  <?php endif; ?>
-
-  <?php if ($footer): ?>
-    <div class="view-footer">
-      <?php print $footer; ?>
-    </div>
-  <?php endif; ?>
-
-  <?php if ($feed_icon): ?>
-    <div class="feed-icon">
-      <?php print $feed_icon; ?>
-    </div>
-  <?php endif; ?>
-
-</div> <?php /* class view */ ?>
diff --git a/tests/views_test.module b/tests/views_test.module
index a746069..be533e0 100644
--- a/tests/views_test.module
+++ b/tests/views_test.module
@@ -23,7 +23,7 @@ function views_test_permission() {
 function views_test_views_api() {
   return array(
     'api' => 3.0,
-    'template path' => drupal_get_path('module', 'views_test') . '/templates',
+    'template path' => drupal_get_path('module', 'views') . '/test_templates',
   );
 }
 
-- 
1.9.1

