NopremiumKernelTestBase.php in Node Option Premium 8
File
tests/src/Kernel/NopremiumKernelTestBase.php
View source
<?php
namespace Drupal\Tests\nopremium\Kernel;
use Drupal\KernelTests\Core\Entity\EntityKernelTestBase;
use Drupal\node\Entity\NodeType;
use Drupal\Tests\node\Traits\NodeCreationTrait;
abstract class NopremiumKernelTestBase extends EntityKernelTestBase {
use NodeCreationTrait;
public static $modules = [
'node',
'nopremium',
'field',
'text',
'filter',
];
protected $nodeType;
protected function setUp() {
parent::setUp();
$this
->installEntitySchema('node');
$this
->installSchema('node', 'node_access');
$this
->installConfig([
'system',
'nopremium',
'field',
'filter',
'node',
]);
$this->nodeType = NodeType::create([
'type' => 'article',
'name' => 'Article',
]);
$this->nodeType
->save();
node_add_body_field($this->nodeType);
}
}