function WorkspaceCRUDTest::testEmptyWorkspaceTree

Same name in other branches
  1. 9 core/modules/workspaces/tests/src/Kernel/WorkspaceCRUDTest.php \Drupal\Tests\workspaces\Kernel\WorkspaceCRUDTest::testEmptyWorkspaceTree()
  2. 10 core/modules/workspaces/tests/src/Kernel/WorkspaceCRUDTest.php \Drupal\Tests\workspaces\Kernel\WorkspaceCRUDTest::testEmptyWorkspaceTree()

Tests loading the workspace tree when there are no workspaces available.

File

core/modules/workspaces/tests/src/Kernel/WorkspaceCRUDTest.php, line 314

Class

WorkspaceCRUDTest
Tests CRUD operations for workspaces.

Namespace

Drupal\Tests\workspaces\Kernel

Code

public function testEmptyWorkspaceTree() : void {
    $tree = \Drupal::service('workspaces.repository')->loadTree();
    $this->assertSame([], $tree);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.