ViewfieldKernelTest.php in Viewfield 8.3
File
tests/src/Kernel/ViewfieldKernelTest.php
View source
<?php
namespace Drupal\Tests\viewfield\Kernel;
use Drupal\field\Entity\FieldConfig;
use Drupal\field\Entity\FieldStorageConfig;
use Drupal\Tests\field\Kernel\FieldKernelTestBase;
class ViewfieldKernelTest extends FieldKernelTestBase {
public static $modules = [
'views',
'viewfield',
];
protected $defaultTheme = 'stark';
protected function setUp() {
parent::setUp();
FieldStorageConfig::create([
'field_name' => 'field_test',
'entity_type' => 'entity_test',
'type' => 'viewfield',
])
->save();
FieldConfig::create([
'entity_type' => 'entity_test',
'field_name' => 'field_test',
'bundle' => 'entity_test',
])
->save();
FieldStorageConfig::create([
'field_name' => 'field_test_default_value',
'entity_type' => 'entity_test',
'type' => 'viewfield',
])
->save();
FieldConfig::create([
'entity_type' => 'entity_test',
'field_name' => 'field_test_default_value',
'bundle' => 'entity_test',
])
->save();
}
public function testViewfieldItem() {
}
public function testViewfieldItemDefaultValue() {
}
}