3 class PageContentTest extends BrowserKitTest
6 public function test_page_includes()
8 $page = \BookStack\Page::first();
9 $secondPage = \BookStack\Page::all()->get(2);
11 $secondPage->html = "<p id='section1'>Hello, This is a test</p><p id='section2'>This is a second block of content</p>";
14 $this->asAdmin()->visit($page->getUrl())
15 ->dontSee('Hello, This is a test');
17 $originalHtml = $page->html;
18 $page->html .= "{{@{$secondPage->id}}}";
21 $this->asAdmin()->visit($page->getUrl())
22 ->see('Hello, This is a test')
23 ->see('This is a second block of content');
25 $page->html = $originalHtml . " Well {{@{$secondPage->id}#section2}}";
28 $this->asAdmin()->visit($page->getUrl())
29 ->dontSee('Hello, This is a test')
30 ->see('Well This is a second block of content');