getEditor(); $updater = $this->getViewer(); $entities = $this->entities->createChainBelongingToUser($creator, $updater); app()->make(UserRepo::class)->destroy($creator); $this->entities->updatePage($entities['page'], ['html' => '

hello!

>']); $this->checkEntitiesViewable($entities); } public function test_entities_viewable_after_updater_deletion() { // Create required assets and revisions $creator = $this->getViewer(); $updater = $this->getEditor(); $entities = $this->entities->createChainBelongingToUser($creator, $updater); app()->make(UserRepo::class)->destroy($updater); $this->entities->updatePage($entities['page'], ['html' => '

Hello there!

']); $this->checkEntitiesViewable($entities); } /** * @param array $entities */ private function checkEntitiesViewable(array $entities) { // Check pages and books are visible. $this->asAdmin(); foreach ($entities as $entity) { $this->get($entity->getUrl()) ->assertStatus(200) ->assertSee($entity->name); } // Check revision listing shows no errors. $this->get($entities['page']->getUrl('/revisions'))->assertStatus(200); } }