Loading core/modules/workspaces/src/WorkspaceListBuilder.php +4 −1 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Render\RendererInterface; use Drupal\Core\Url; use Drupal\user\UserInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** Loading Loading @@ -121,7 +122,9 @@ public function buildRow(EntityInterface $entity) { '#url' => $entity->toUrl(), ], ], 'owner' => $entity->getOwner()->getDisplayName(), 'owner' => (($owner = $entity->getOwner()) && $owner instanceof UserInterface) ? $owner->getDisplayName() : $this->t('N/A'), ]; $row['data'] = $row['data'] + parent::buildRow($entity); Loading core/modules/workspaces/tests/src/Functional/WorkspaceTest.php +10 −0 Original line number Diff line number Diff line Loading @@ -299,6 +299,16 @@ public function testWorkspaceList() { // 'Live' is no longer the active workspace, so it's 'Switch to Live' // operation should be visible now. $assert_session->linkExists('Switch to Live'); // Delete any of the workspace owners and visit workspaces listing. $this->drupalLogin($this->editor2); user_cancel([], $this->editor1->id(), 'user_cancel_reassign'); $user = \Drupal::service('entity_type.manager')->getStorage('user')->load($this->editor1->id()); $user->delete(); $this->drupalGet('/admin/config/workflow/workspaces'); $this->assertSession()->pageTextContains('Summer event'); $summer_event_workspace_row = $page->find('css', 'table tbody tr:nth-of-type(3)'); $this->assertEquals('N/A', $summer_event_workspace_row->find('css', 'td:nth-of-type(2)')->getText()); } /** Loading Loading
core/modules/workspaces/src/WorkspaceListBuilder.php +4 −1 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Render\RendererInterface; use Drupal\Core\Url; use Drupal\user\UserInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** Loading Loading @@ -121,7 +122,9 @@ public function buildRow(EntityInterface $entity) { '#url' => $entity->toUrl(), ], ], 'owner' => $entity->getOwner()->getDisplayName(), 'owner' => (($owner = $entity->getOwner()) && $owner instanceof UserInterface) ? $owner->getDisplayName() : $this->t('N/A'), ]; $row['data'] = $row['data'] + parent::buildRow($entity); Loading
core/modules/workspaces/tests/src/Functional/WorkspaceTest.php +10 −0 Original line number Diff line number Diff line Loading @@ -299,6 +299,16 @@ public function testWorkspaceList() { // 'Live' is no longer the active workspace, so it's 'Switch to Live' // operation should be visible now. $assert_session->linkExists('Switch to Live'); // Delete any of the workspace owners and visit workspaces listing. $this->drupalLogin($this->editor2); user_cancel([], $this->editor1->id(), 'user_cancel_reassign'); $user = \Drupal::service('entity_type.manager')->getStorage('user')->load($this->editor1->id()); $user->delete(); $this->drupalGet('/admin/config/workflow/workspaces'); $this->assertSession()->pageTextContains('Summer event'); $summer_event_workspace_row = $page->find('css', 'table tbody tr:nth-of-type(3)'); $this->assertEquals('N/A', $summer_event_workspace_row->find('css', 'td:nth-of-type(2)')->getText()); } /** Loading