outline-8.x-1.x-dev/tests/src/Functional/EntryCacheTagsTest.php
tests/src/Functional/EntryCacheTagsTest.php
<?php
namespace Drupal\Tests\outline\Functional;
use Drupal\outline\Entity\Outline;
use Drupal\outline\Entity\Entry;
use Drupal\Tests\system\Functional\Entity\EntityWithUriCacheTagsTestBase;
/**
* Tests the Outline entry entity's cache tags.
*
* @group outline
*/
class EntryCacheTagsTest extends EntityWithUriCacheTagsTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = ['outline'];
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
*/
protected function createEntity() {
// Create a "Camelids" outline.
$outline = Outline::create([
'name' => 'Camelids',
'oid' => 'camelids',
]);
$outline->save();
// Create a "Llama" outline entry.
$entry = Entry::create([
'name' => 'Llama',
'oid' => $outline->id(),
]);
$entry->save();
return $entry;
}
}
