blob: 514077dbea44fe95ac87963cfbbef12e3025246f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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);
}
}
}
|