function StyleSerializerKernelTest::testCalculateDepenencies
Same name in this branch
- 9 core/modules/rest/tests/src/Kernel/Views/StyleSerializerKernelTest.php \Drupal\Tests\rest\Kernel\Views\StyleSerializerKernelTest::testCalculateDepenencies()
Same name in other branches
- 8.9.x core/modules/rest/tests/src/Kernel/Views/StyleSerializerKernelTest.php \Drupal\Tests\rest\Kernel\Views\StyleSerializerKernelTest::testCalculateDepenencies()
@covers ::calculateDependencies
File
-
core/
modules/ hal/ tests/ src/ Kernel/ rest/ Views/ StyleSerializerKernelTest.php, line 38
Class
- StyleSerializerKernelTest
- @coversDefaultClass \Drupal\rest\Plugin\views\style\Serializer @group hal @group legacy
Namespace
Drupal\Tests\hal\Kernel\rest\ViewsCode
public function testCalculateDepenencies() {
/** @var \Drupal\views\Entity\View $view */
$view = View::load('test_serializer_display_entity');
$display =& $view->getDisplay('rest_export_1');
$display['display_options']['defaults']['style'] = FALSE;
$display['display_options']['style']['type'] = 'serializer';
$display['display_options']['style']['options']['formats'] = [
'json',
'xml',
'hal_json',
];
$view->save();
$view->calculateDependencies();
$this->assertEquals([
'module' => [
'hal',
'rest',
'serialization',
'user',
],
], $view->getDependencies());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.