summaryrefslogtreecommitdiff
path: root/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/styles/views_plugin_style_base.test
diff options
context:
space:
mode:
Diffstat (limited to 'kolab.org/www/drupal-7.18/sites/all/modules/views/tests/styles/views_plugin_style_base.test')
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/tests/styles/views_plugin_style_base.test33
1 files changed, 33 insertions, 0 deletions
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/styles/views_plugin_style_base.test b/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/styles/views_plugin_style_base.test
new file mode 100644
index 0000000..514077d
--- /dev/null
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/styles/views_plugin_style_base.test
@@ -0,0 +1,33 @@
+<?php
+
+/**
+ * @file
+ * Definition of ViewsPluginStyleTestBase.
+ */
+
+/**
+ * Provides a base foundation for testing style plugins.
+ */
+abstract class ViewsPluginStyleTestBase extends ViewsSqlTest {
+
+ /**
+ * Stores the SimpleXML representation of the output.
+ *
+ * @var SimpleXMLElement
+ */
+ protected $elements;
+
+ /**
+ * Stores a view output in the elements.
+ */
+ function storeViewPreview($output) {
+ $htmlDom = new DOMDocument();
+ @$htmlDom->loadHTML($output);
+ if ($htmlDom) {
+ // It's much easier to work with simplexml than DOM, luckily enough
+ // we can just simply import our DOM tree.
+ $this->elements = simplexml_import_dom($htmlDom);
+ }
+ }
+
+}