Entity\TagTests::getPageWithTags PHP Method

getPageWithTags() protected method

Get an instance of a page that has many tags.
protected getPageWithTags ( Tag[] | boolean $tags = false ) : mixed
$tags BookStack\Tag[] | boolean
return mixed
    protected function getPageWithTags($tags = false)
    {
        $page = Page::first();
        if (!$tags) {
            $tags = factory(Tag::class, $this->defaultTagCount)->make();
        }
        $page->tags()->saveMany($tags);
        return $page;
    }