public function ViewUnpublishedDependencyTest::testDependencyNotAdded in view_unpublished 8
Tests view_unpublished not added as dependency of content view.
File
- tests/
src/ Kernel/ ViewUnpublishedDependencyTest.php, line 44
Class
- ViewUnpublishedDependencyTest
- Tests the View Unpublished dependency issue.
Namespace
Drupal\Tests\view_unpublished\KernelCode
public function testDependencyNotAdded() {
// Check dependency before saving.
$module_deps = $this
->config('views.view.content')
->get('dependencies.module');
$this
->assertArrayNotHasKey('view_unpublished', array_flip($module_deps));
// Save and check again.
$view = Views::getView('content');
$view
->save();
$module_deps = $this
->config('views.view.content')
->get('dependencies.module');
$this
->assertArrayNotHasKey('view_unpublished', array_flip($module_deps));
}