1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Extracted entity testcase methods to own class

Also added some new fetch helper methods for future use.
This commit is contained in:
Dan Brown
2022-09-29 16:49:25 +01:00
parent 0e94fd44a8
commit 068a8a068c
23 changed files with 305 additions and 208 deletions

View File

@ -188,7 +188,7 @@ class TagTest extends TestCase
$resp->assertSee('GreatTestContent');
$page->restricted = true;
$this->regenEntityPermissions($page);
$this->entities->regenPermissions($page);
$resp = $this->asEditor()->get('/tags');
$resp->assertDontSee('SuperCategory');
@ -207,7 +207,7 @@ class TagTest extends TestCase
{
$this->asEditor();
foreach ($this->getEachEntityType() as $entity) {
foreach ($this->entities->all() as $entity) {
$entity->tags()->create(['name' => 'My Super Tag Name', 'value' => 'An-awesome-value']);
$html = $this->withHtml($this->get($entity->getUrl()));
$html->assertElementExists('body.tag-name-mysupertagname.tag-value-anawesomevalue.tag-pair-mysupertagname-anawesomevalue');