function ModuleTest::testStatusFunctions in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/src/Tests/ModuleTest.php \Drupal\views\Tests\ModuleTest::testStatusFunctions()
Tests view enable and disable procedural wrapper functions.
File
- core/
modules/ views/ src/ Tests/ ModuleTest.php, line 213 - Contains \Drupal\views\Tests\ModuleTest.
Class
Namespace
Drupal\views\TestsCode
function testStatusFunctions() {
$view = Views::getView('test_view_status')->storage;
$this
->assertFalse($view
->status(), 'The view status is disabled.');
views_enable_view($view);
$this
->assertTrue($view
->status(), 'A view has been enabled.');
$this
->assertEqual($view
->status(), views_view_is_enabled($view), 'views_view_is_enabled is correct.');
views_disable_view($view);
$this
->assertFalse($view
->status(), 'A view has been disabled.');
$this
->assertEqual(!$view
->status(), views_view_is_disabled($view), 'views_view_is_disabled is correct.');
}