$this->actingAs($editor)->delete($book->getUrl());
$viewReq = $this->asAdmin()->get('/settings/recycle-bin');
- $viewReq->assertElementContains('table.table', $page->name);
- $viewReq->assertElementContains('table.table', $editor->name);
- $viewReq->assertElementContains('table.table', $book->name);
- $viewReq->assertElementContains('table.table', $book->pages_count . ' Pages');
- $viewReq->assertElementContains('table.table', $book->chapters_count . ' Chapters');
+ $html = $this->withHtml($viewReq);
+ $html->assertElementContains('table.table', $page->name);
+ $html->assertElementContains('table.table', $editor->name);
+ $html->assertElementContains('table.table', $book->name);
+ $html->assertElementContains('table.table', $book->pages_count . ' Pages');
+ $html->assertElementContains('table.table', $book->chapters_count . ' Chapters');
}
public function test_recycle_bin_empty()
$itemCount = 2 + $book->pages->count() + $book->chapters->count();
$redirectReq = $this->get('/settings/recycle-bin');
- $redirectReq->assertNotificationContains('Deleted ' . $itemCount . ' total items from the recycle bin');
+ $this->assertNotificationContains($redirectReq, 'Deleted ' . $itemCount . ' total items from the recycle bin');
}
public function test_entity_restore()
$itemCount = 1 + $book->pages->count() + $book->chapters->count();
$redirectReq = $this->get('/settings/recycle-bin');
- $redirectReq->assertNotificationContains('Restored ' . $itemCount . ' total items from the recycle bin');
+ $this->assertNotificationContains($redirectReq, 'Restored ' . $itemCount . ' total items from the recycle bin');
}
public function test_permanent_delete()
$itemCount = 1 + $book->pages->count() + $book->chapters->count();
$redirectReq = $this->get('/settings/recycle-bin');
- $redirectReq->assertNotificationContains('Deleted ' . $itemCount . ' total items from the recycle bin');
+ $this->assertNotificationContains($redirectReq, 'Deleted ' . $itemCount . ' total items from the recycle bin');
}
public function test_permanent_delete_for_each_type()
$pageRestoreView = $this->asAdmin()->get("/settings/recycle-bin/{$pageDeletion->id}/restore");
$pageRestoreView->assertSee('The parent of this item has also been deleted.');
- $pageRestoreView->assertElementContains('a[href$="/settings/recycle-bin/' . $bookDeletion->id . '/restore"]', 'Restore Parent');
+ $this->withHtml($pageRestoreView)->assertElementContains('a[href$="/settings/recycle-bin/' . $bookDeletion->id . '/restore"]', 'Restore Parent');
}
}