
| Current Path : /var/www/html/rocksensor1/web/core/modules/views/tests/src/Kernel/Plugin/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/rocksensor1/web/core/modules/views/tests/src/Kernel/Plugin/StyleTestBase.php |
<?php
declare(strict_types=1);
namespace Drupal\Tests\views\Kernel\Plugin;
use Drupal\Component\Utility\Html;
use Drupal\Tests\views\Kernel\ViewsKernelTestBase;
/**
* Tests some general style plugin related functionality.
*/
abstract class StyleTestBase extends ViewsKernelTestBase {
/**
* Stores the SimpleXML representation of the output.
*
* @var \SimpleXMLElement
*/
protected $elements;
/**
* Stores a view output in the elements.
*/
public function storeViewPreview($output) {
$htmlDom = Html::load($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);
}
}
}